|
|
@ -14,7 +14,7 @@ |
|
|
|
//! Corresponds to the BARE schema
|
|
|
|
//! Corresponds to the BARE schema
|
|
|
|
|
|
|
|
|
|
|
|
use crate::errors::NgError; |
|
|
|
use crate::errors::NgError; |
|
|
|
use crate::utils::{decode_key, dh_pubkey_from_ed_slice}; |
|
|
|
use crate::utils::{decode_key, dh_pubkey_from_ed_slice, ed_privkey_to_pubkey}; |
|
|
|
use core::fmt; |
|
|
|
use core::fmt; |
|
|
|
use serde::{Deserialize, Serialize}; |
|
|
|
use serde::{Deserialize, Serialize}; |
|
|
|
use serde_bare::to_vec; |
|
|
|
use serde_bare::to_vec; |
|
|
@ -124,6 +124,9 @@ impl PrivKey { |
|
|
|
PrivKey::Ed25519PrivKey(o) => o, |
|
|
|
PrivKey::Ed25519PrivKey(o) => o, |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
pub fn to_pub(&self) -> PubKey { |
|
|
|
|
|
|
|
ed_privkey_to_pubkey(self) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
impl From<[u8; 32]> for PrivKey { |
|
|
|
impl From<[u8; 32]> for PrivKey { |
|
|
|