[−][src]Trait snow::types::Dh
Diffie-Hellman operations
Required methods
fn name(&self) -> &'static str
The string that the Noise spec defines for the primitive
fn pub_len(&self) -> usize
The length in bytes of a public key for this primitive
fn priv_len(&self) -> usize
The length in bytes of a private key for this primitive
fn set(&mut self, privkey: &[u8])
Set the private key
fn generate(&mut self, rng: &mut dyn Random)
Generate a new private key
fn pubkey(&self) -> &[u8]
Get the public key
fn privkey(&self) -> &[u8]
Get the private key
#[must_use]
fn dh(&self, pubkey: &[u8], out: &mut [u8]) -> Result<(), ()>
Calculate a Diffie-Hellman exchange.