Expose SpendingKey byte representation.

This commit is contained in:
Kris Nuttycombe 2021-08-02 14:54:48 -06:00
parent c803114bf6
commit 872f337811
1 changed files with 5 additions and 0 deletions

View File

@ -64,6 +64,11 @@ impl SpendingKey {
let ivk = KeyAgreementPrivateKey::derive_inner(&(&sk).into());
CtOption::new(sk, !(ask.ct_is_zero() | ivk.is_none()))
}
/// Returns the raw bytes of the spending key.
pub fn to_bytes(&self) -> &[u8; 32] {
&self.0
}
}
/// A spend authorizing key, used to create spend authorization signatures.