HashEngine

Trait HashEngine 

Source
pub trait HashEngine: Send + Sync {
    // Required methods
    fn digest(&self, data: &[u8]) -> Vec<u8> ;
    fn code(&self) -> Code;
    fn name(&self) -> &'static str;

    // Provided method
    fn is_simd_enabled(&self) -> bool { ... }
}
Expand description

Trait for hardware-accelerated hash computation

Required Methods§

Source

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

Compute hash of data

Source

fn code(&self) -> Code

Get the multihash code for this algorithm

Source

fn name(&self) -> &'static str

Get the name of this hash algorithm

Provided Methods§

Source

fn is_simd_enabled(&self) -> bool

Check if SIMD acceleration is enabled

Implementors§