pub trait Digest<const HASH_LEN: usize> {
// Required methods
fn hash(digest: &mut [u8], payload: &[u8]);
fn update(&mut self, payload: &[u8]);
fn finish(&self, digest: &mut [u8; HASH_LEN]);
fn reset(&mut self);
}Expand description
Re-export the Digest trait.
A Hash algorithm returning hashes of length HASH_LEN.
Required Methods§
Sourcefn hash(digest: &mut [u8], payload: &[u8])
fn hash(digest: &mut [u8], payload: &[u8])
Writes the digest for the given input byte slice, into digest in immediate mode.
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.