Hasher

Trait Hasher 

Source
pub trait Hasher {
    type Output;

    // Required methods
    fn update<D: AsRef<[u8]>>(&mut self, data: D);
    fn finish(self) -> Self::Output;
    fn digest<H: Hashable>(data: &H) -> Self::Output;
}

Required Associated Types§

Required Methods§

Source

fn update<D: AsRef<[u8]>>(&mut self, data: D)

Source

fn finish(self) -> Self::Output

Source

fn digest<H: Hashable>(data: &H) -> Self::Output

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.

Implementations on Foreign Types§

Source§

impl Hasher for Sha256

Source§

type Output = [u8; 32]

Source§

fn update<D: AsRef<[u8]>>(&mut self, data: D)

Source§

fn finish(self) -> Self::Output

Source§

fn digest<H: Hashable>(data: &H) -> Self::Output

Implementors§