Skip to main content

MiniDigest

Trait MiniDigest 

Source
pub trait MiniDigest: Sized {
    type HashOutput;

    // Required methods
    fn new() -> Self;
    fn digest(input: impl AsRef<[u8]>) -> Self::HashOutput;
    fn update(&mut self, input: impl AsRef<[u8]>);
    fn finalize(self) -> Self::HashOutput;
    fn finalize_reset(&mut self) -> Self::HashOutput;
}

Required Associated Types§

Required Methods§

Source

fn new() -> Self

Source

fn digest(input: impl AsRef<[u8]>) -> Self::HashOutput

Source

fn update(&mut self, input: impl AsRef<[u8]>)

Source

fn finalize(self) -> Self::HashOutput

Source

fn finalize_reset(&mut self) -> Self::HashOutput

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.

Implementors§