Hash

Trait Hash 

Source
pub trait Hash<const OUTPUT_LEN: usize> {
    // Required method
    fn hash(
        digest: &mut [u8; OUTPUT_LEN],
        payload: &[u8],
    ) -> Result<(), HashError>;
}
Expand description

A trait for oneshot hashing, where the output is written into a provided buffer.

Required Methods§

Source

fn hash(digest: &mut [u8; OUTPUT_LEN], payload: &[u8]) -> Result<(), HashError>

Writes the digest for the given input byte slice, into digest in immediate mode.

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§