pub struct Hasher<F, Digest, H, C> { /* private fields */ }Expand description
MerkleHasher implementation built from a cryptographic hash function and a compression function. This struct is intended for use by the protocol verifier. Prover backends may use independent but functionally equivalent implementations.
The compression function does not need to be collision-resistant and only needs to be a pseudo-cryptographic function: https://eprint.iacr.org/2026/089.
Implementations§
Trait Implementations§
Source§impl<F, Digest, H, C> MerkleHasher for Hasher<F, Digest, H, C>
impl<F, Digest, H, C> MerkleHasher for Hasher<F, Digest, H, C>
type F = F
type Digest = Digest
Source§fn hash_slice(&self, vals: &[Self::F]) -> Self::Digest
fn hash_slice(&self, vals: &[Self::F]) -> Self::Digest
Hash a slice of field elements into a digest (used for leaf hashing).
Auto Trait Implementations§
impl<F, Digest, H, C> Freeze for Hasher<F, Digest, H, C>
impl<F, Digest, H, C> RefUnwindSafe for Hasher<F, Digest, H, C>
impl<F, Digest, H, C> Send for Hasher<F, Digest, H, C>
impl<F, Digest, H, C> Sync for Hasher<F, Digest, H, C>
impl<F, Digest, H, C> Unpin for Hasher<F, Digest, H, C>
impl<F, Digest, H, C> UnsafeUnpin for Hasher<F, Digest, H, C>where
H: UnsafeUnpin,
C: UnsafeUnpin,
impl<F, Digest, H, C> UnwindSafe for Hasher<F, Digest, H, C>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more