Update to latest interop keypair spec

This commit is contained in:
Paul Hauner
2019-08-30 13:30:07 +10:00
parent 2e11faf763
commit 25f2e212c3
6 changed files with 121 additions and 112 deletions

View File

@@ -20,6 +20,10 @@ impl SecretKey {
SecretKey(RawSecretKey::random(&mut rand::thread_rng()))
}
pub fn from_raw(raw: RawSecretKey) -> Self {
Self(raw)
}
/// Returns the underlying point as compressed bytes.
fn as_bytes(&self) -> Vec<u8> {
self.as_raw().as_bytes()