[][src]Trait crypto_api::hash::Hash

pub trait Hash {
    fn info(&self) -> HashInfo;
fn hash(
        &self,
        buf: &mut [u8],
        data: &[u8]
    ) -> Result<usize, Box<dyn Error + 'static>>; }

A stateless (oneshot) hash interface

Required methods

fn info(&self) -> HashInfo

Returns information about the hash

fn hash(
    &self,
    buf: &mut [u8],
    data: &[u8]
) -> Result<usize, Box<dyn Error + 'static>>

Hashes data into buf and returns the hash length

Loading content...

Implementors

Loading content...