Struct noise_rust_crypto::Sha256
[−]
[src]
pub struct Sha256 { /* fields omitted */ }
Trait Implementations
impl Default for Sha256
[src]
impl Hash for Sha256
[src]
type Block = [u8; 64]
Type of a block.
type Output = [u8; 32]
Type of output.
fn name() -> &'static str
Name of the hash function.
fn input(&mut self, data: &[u8])
Update hash context with some input.
fn result(&mut self) -> Self::Output
Get hash result.
fn block_len() -> usize
Length of block.
fn hash_len() -> usize
Length of hash output, in number of bytes.
fn reset(&mut self)
Reset state of hash context.
fn hash(data: &[u8]) -> Self::Output
Calculate hash of some data.
fn hmac_many(key: &[u8], data: &[&[u8]]) -> Self::Output
Calculate HMAC-THIS-HASH, with some key
and several messages.
fn hmac(key: &[u8], data: &[u8]) -> Self::Output
Calculate HMAC-THIS-HASH, with some key
and a message.
fn hkdf(chaining_key: &[u8],
input_key_material: &[u8])
-> (Self::Output, Self::Output)
input_key_material: &[u8])
-> (Self::Output, Self::Output)
Calculate HKDF, as specified in the noise spec.