pub trait Hasher:
Default
+ Clone
+ Hasher
+ Hasher {
type Digest: Digest;
// Required methods
fn update(&mut self, bytes: &[u8]);
fn finish(self) -> Self::Digest;
// Provided method
fn hash(bytes: &[u8]) -> Self::Digest { ... }
}
Expand description
A cryptographic hash function.
Required Associated Types§
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.