Skip to main content

Hash

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

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§