DigestExt

Trait DigestExt 

Source
pub trait DigestExt<const BYTE_LEN: usize = 32>: Digest {
    // Required methods
    fn from_tag(tag: impl AsRef<[u8]>) -> Self;
    fn input_raw(&mut self, data: &[u8]);
    fn finish(self) -> [u8; BYTE_LEN];

    // Provided method
    fn input_with_len<const MAX: usize>(&mut self, data: &[u8]) { ... }
}

Required Methods§

Source

fn from_tag(tag: impl AsRef<[u8]>) -> Self

Source

fn input_raw(&mut self, data: &[u8])

Source

fn finish(self) -> [u8; BYTE_LEN]

Provided Methods§

Source

fn input_with_len<const MAX: usize>(&mut self, data: &[u8])

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 DigestExt<20> for CoreWrapper<Ripemd160Core>

Source§

fn from_tag(tag: impl AsRef<[u8]>) -> CoreWrapper<Ripemd160Core>

Source§

fn input_raw(&mut self, data: &[u8])

Source§

fn finish(self) -> [u8; 20]

Implementors§