pub trait Hasher {
// Required method
fn digest(&self, alg: Algorithm, data: &[u8]) -> Vec<u8> ⓘ;
}Expand description
A digest implementation. Sha2 is the built-in one; the trait exists so a
caller can substitute an accelerated or host-provided digest without the
binding algorithm depending on either.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".