pub trait Hasher:
Sized
+ Clone
+ Zeroize {
const BLOCK_SIZE: usize;
const OUTPUT_SIZE: usize;
// Required methods
fn new() -> Self;
fn update(&mut self, data: &[u8]);
fn sum(self) -> Hash;
// Provided method
fn hash(data: &[u8]) -> Hash { ... }
}Required Associated Constants§
Sourceconst BLOCK_SIZE: usize
const BLOCK_SIZE: usize
The internal block size of the hash function
Sourceconst OUTPUT_SIZE: usize
const OUTPUT_SIZE: usize
The output size of the hash function
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".