Trait sc_network::multiaddr::multihash::StatefulHasher[]

pub trait StatefulHasher: Default + Send + Sync {
    type Size: Size;
    type Digest: Digest<Self::Size>;
    fn update(&mut self, input: &[u8]);
fn finalize(&self) -> Self::Digest;
fn reset(&mut self); }
Expand description

Trait implemented by a hash function implementation.

Associated Types

The maximum Digest size for that hasher (it is stack allocated).

The Digest type to distinguish the output of different Hasher implementations.

Required methods

Consume input and update internal state.

Returns the final digest.

Reset the internal hasher state.

Implementors