Trait CryptoHash

Source
pub trait CryptoHash: HashOutput + Sealed {
    // Required methods
    fn hash(input: &[u8], output: &mut <Self as HashOutput>::Type);
    fn hash_with_buffer(
        input: &[u8],
        buffer: &mut [u8],
        output: &mut <Self as HashOutput>::Type,
    );
}
Expand description

Types that are usable as built-in cryptographic hashes.

Required Methods§

Source

fn hash(input: &[u8], output: &mut <Self as HashOutput>::Type)

Hashes the given raw byte input and copies the result into output.

Source

fn hash_with_buffer( input: &[u8], buffer: &mut [u8], output: &mut <Self as HashOutput>::Type, )

Hashes the given raw byte input and copies the result into output.

Utilizes buffer

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§