pub trait Digest:
Algorithm
+ Clone
+ Default {
type Output: AsRef<[u8]> + AsMut<[u8]> + Copy;
const OUTPUT_LEN: usize;
const BLOCK_LEN: usize;
// Required methods
fn update(&mut self, data: &[u8]);
fn finalize(self) -> Self::Output;
// Provided methods
fn new() -> Self { ... }
fn digest(data: &[u8]) -> Self::Output { ... }
}Expand description
A cryptographic hash function with a fixed-length output.
Required Associated Constants§
Sourceconst OUTPUT_LEN: usize
const OUTPUT_LEN: usize
Output length in bytes.
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".