Trait multihash::StatefulHasher [−][src]
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); }
Trait implemented by a hash function implementation.
Associated Types
type Size: Size
[src]
The maximum Digest size for that hasher (it is stack allocated).
type Digest: Digest<Self::Size>
[src]
The Digest type to distinguish the output of different Hasher
implementations.
Required methods
fn update(&mut self, input: &[u8])
[src]
Consume input and update internal state.
fn finalize(&self) -> Self::Digest
[src]
Returns the final digest.
fn reset(&mut self)
[src]
Reset the internal hasher state.
Implementors
impl StatefulHasher for Keccak224
[src]
impl StatefulHasher for Keccak224
[src]impl StatefulHasher for Keccak256
[src]
impl StatefulHasher for Keccak256
[src]impl StatefulHasher for Keccak384
[src]
impl StatefulHasher for Keccak384
[src]impl StatefulHasher for Keccak512
[src]
impl StatefulHasher for Keccak512
[src]impl StatefulHasher for Sha2_256
[src]
impl StatefulHasher for Sha2_256
[src]impl StatefulHasher for Sha2_512
[src]
impl StatefulHasher for Sha2_512
[src]impl StatefulHasher for Sha3_224
[src]
impl StatefulHasher for Sha3_224
[src]impl StatefulHasher for Sha3_256
[src]
impl StatefulHasher for Sha3_256
[src]impl StatefulHasher for Sha3_384
[src]
impl StatefulHasher for Sha3_384
[src]impl StatefulHasher for Sha3_512
[src]
impl StatefulHasher for Sha3_512
[src]impl<S: Size> StatefulHasher for Blake2bHasher<S>
[src]
impl<S: Size> StatefulHasher for Blake2bHasher<S>
[src]impl<S: Size> StatefulHasher for Blake2sHasher<S>
[src]
impl<S: Size> StatefulHasher for Blake2sHasher<S>
[src]impl<S: Size> StatefulHasher for Blake3Hasher<S>
[src]
impl<S: Size> StatefulHasher for Blake3Hasher<S>
[src]