HashAlgo

Trait HashAlgo 

Source
pub trait HashAlgo: Default {
    type Kernel: HashAlgoKernel;

    // Provided methods
    fn setup() -> <<Self as HashAlgo>::Kernel as HashAlgoKernel>::Option { ... }
    fn hash(
        input: &[u8],
    ) -> Result<<<Self as HashAlgo>::Kernel as HashAlgoKernel>::Output, <<Self as HashAlgo>::Kernel as HashAlgoKernel>::Error> { ... }
}
Expand description

A hash algorithm.

Required Associated Types§

Provided Methods§

Source

fn setup() -> <<Self as HashAlgo>::Kernel as HashAlgoKernel>::Option

Source

fn hash( input: &[u8], ) -> Result<<<Self as HashAlgo>::Kernel as HashAlgoKernel>::Output, <<Self as HashAlgo>::Kernel as HashAlgoKernel>::Error>

Input the complete bytes to compute the digest.

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.

Implementors§