Skip to main content

HasherExt

Trait HasherExt 

Source
pub trait HasherExt {
    type Digest;

    // Required method
    fn hash_iter<'a>(slices: impl Iterator<Item = &'a [u8]>) -> Self::Digest;
}
Expand description

Extension trait for hashers to provide iterator-based hashing.

Required Associated Types§

Source

type Digest

The digest type produced by this hasher.

Required Methods§

Source

fn hash_iter<'a>(slices: impl Iterator<Item = &'a [u8]>) -> Self::Digest

Hashes an iterator of byte slices.

This method allows for more efficient hashing by avoiding the need to allocate a contiguous buffer when the input data is already available as discrete slices.

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§

Source§

impl HasherExt for Blake3_192

Source§

type Digest = Digest<miden_crypto::::hash::digest::Digest192::{constant#0}>

Source§

impl HasherExt for Blake3_256

Source§

type Digest = Digest<miden_crypto::::hash::digest::Digest256::{constant#0}>

Source§

impl HasherExt for Keccak256

Source§

type Digest = Digest<miden_crypto::::hash::digest::Digest256::{constant#0}>

Source§

impl HasherExt for Sha256

Source§

type Digest = Digest<miden_crypto::::hash::digest::Digest256::{constant#0}>

Source§

impl HasherExt for Sha512

Source§

type Digest = Digest<miden_crypto::::hash::digest::Digest512::{constant#0}>