pub trait Digest: Clone + Sized {
type Output: Copy + Eq + Sized + Send + AsRef<[u8]> + for<'a> TryFrom<&'a [u8]> + Debug;
const DIGEST_NAME: &'static str;
const OUTPUT_LEN: usize;
const BLOCK_LEN: usize;
// Required methods
fn new() -> Self;
fn input(&mut self, data: impl AsRef<[u8]>);
fn finalize(self) -> Self::Output;
// Provided methods
fn with_output_slice(slice: &[u8]) -> Option<Self> { ... }
fn digest(data: impl AsRef<[u8]>) -> Self::Output { ... }
fn digest_concat(
data: impl IntoIterator<Item = impl AsRef<[u8]>>
) -> Self::Output { ... }
}
Required Associated Types§
Required Associated Constants§
Required Methods§
fn new() -> Self
fn input(&mut self, data: impl AsRef<[u8]>)
fn finalize(self) -> Self::Output
Provided Methods§
fn with_output_slice(slice: &[u8]) -> Option<Self>
fn digest(data: impl AsRef<[u8]>) -> Self::Output
fn digest_concat( data: impl IntoIterator<Item = impl AsRef<[u8]>> ) -> Self::Output
Object Safety§
This trait is not object safe.