Trait Hash

Source
pub trait Hash {
    // Required methods
    fn hash(&self, data: &[u8]) -> Result<Vec<u8>>;
    fn output_size(&self) -> usize;
}
Expand description

Trait for hash functions

Required Methods§

Source

fn hash(&self, data: &[u8]) -> Result<Vec<u8>>

Hash data

Source

fn output_size(&self) -> usize

Get the output size in bytes

Implementors§