Trait snow::types::Hash [−][src]
Hashing operations
Required methods
fn name(&self) -> &'static str
[src]
The string that the Noise spec defines for the primitive
fn block_len(&self) -> usize
[src]
The block length for the primitive
fn hash_len(&self) -> usize
[src]
The final hash digest length for the primitive
fn reset(&mut self)
[src]
Reset the internal state
fn input(&mut self, data: &[u8])
[src]
Provide input to the internal state
fn result(&mut self, out: &mut [u8])
[src]
Get the resulting hash
Provided methods
fn hmac(&mut self, key: &[u8], data: &[u8], out: &mut [u8])
[src]
Calculate HMAC, as specified in the Noise spec.
NOTE: This method clobbers the existing internal state
fn hkdf(
&mut self,
chaining_key: &[u8],
input_key_material: &[u8],
outputs: usize,
out1: &mut [u8],
out2: &mut [u8],
out3: &mut [u8]
)
[src]
&mut self,
chaining_key: &[u8],
input_key_material: &[u8],
outputs: usize,
out1: &mut [u8],
out2: &mut [u8],
out3: &mut [u8]
)
Derive keys as specified in the Noise spec.
NOTE: This method clobbers the existing internal state