pub struct Keypair { /* private fields */ }
Expand description
Key pair used by the noise protocol.
Implementations§
Source§impl Keypair
impl Keypair
Sourcepub fn new(params: NoiseParams) -> Result<Self>
pub fn new(params: NoiseParams) -> Result<Self>
Generate a new keypair.
Sourcepub fn public_key(&self) -> &[u8] ⓘ
pub fn public_key(&self) -> &[u8] ⓘ
Public key.
Sourcepub fn private_key(&self) -> &[u8] ⓘ
pub fn private_key(&self) -> &[u8] ⓘ
Private key.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Keypair
impl<'de> Deserialize<'de> for Keypair
Source§fn deserialize<D>(deserializer: D) -> Result<Keypair, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Keypair, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Keypair
impl RefUnwindSafe for Keypair
impl Send for Keypair
impl Sync for Keypair
impl Unpin for Keypair
impl UnwindSafe for Keypair
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more