multihash_derive/hasher.rs
1/// Trait implemented by a hash function implementation.
2pub trait Hasher {
3 /// Consume input and update internal state.
4 fn update(&mut self, input: &[u8]);
5
6 /// Returns the final digest.
7 fn finalize(&mut self) -> &[u8];
8
9 /// Reset the internal hasher state.
10 fn reset(&mut self);
11}