Skip to main content

Hash

Trait Hash 

Source
pub trait Hash:
    PartialEq
    + AsRef<[u8]>
    + Copy {
    type HashState;

    // Required methods
    fn new() -> Self::HashState;
    fn update(state: &mut Self::HashState, data: impl AsRef<[u8]>);
    fn finalize(state: Self::HashState) -> Self;
}

Required Associated Types§

Required Methods§

Source

fn new() -> Self::HashState

Source

fn update(state: &mut Self::HashState, data: impl AsRef<[u8]>)

Source

fn finalize(state: Self::HashState) -> Self

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§