binius_hash::hasher

Trait HashDigest

source
pub trait HashDigest<T> {
    type Digest;

    // Required method
    fn hash(data: impl AsRef<[T]>) -> Self::Digest;
}
Expand description

Trait representing the simplest and most straight forward use case of a hash function

This is a highly simplified trait that just treats the entire interface of a hash as a simple function that takes in a slice of inputs and gives you back an output.

Required Associated Types§

source

type Digest

The hash function output type.

Required Methods§

source

fn hash(data: impl AsRef<[T]>) -> Self::Digest

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T, H: FixedLenHasher<T>> HashDigest<T> for FixedLenHasherDigest<T, H>

source§

impl<T, H: Hasher<T>> HashDigest<T> for HasherDigest<T, H>

source§

type Digest = <H as Hasher<T>>::Digest