pub trait ElementHasher: Hasher {
    type BaseField: StarkField;

    // Required method
    fn hash_elements<E>(elements: &[E]) -> Self::Digest
       where E: FieldElement<BaseField = Self::BaseField>;
}
Expand description

Defines a cryptographic hash function for hashing field elements.

This trait defines a hash procedure for a sequence of field elements. The elements can be either in the base field specified for this hasher, or in an extension of the base field.

Required Associated Types§

type BaseField: StarkField

Specifies a base field for elements which can be hashed with this hasher.

Required Methods§

fn hash_elements<E>(elements: &[E]) -> Self::Digest
where E: FieldElement<BaseField = Self::BaseField>,

Returns a hash of the provided field elements.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

§

impl ElementHasher for Blake3_160

§

type BaseField = BaseElement

§

fn hash_elements<E>(elements: &[E]) -> <Blake3_160 as Hasher>::Digest
where E: FieldElement<BaseField = <Blake3_160 as ElementHasher>::BaseField>,

§

impl ElementHasher for Rpx256

§

type BaseField = BaseElement

§

fn hash_elements<E>(elements: &[E]) -> <Rpx256 as Hasher>::Digest
where E: FieldElement<BaseField = <Rpx256 as ElementHasher>::BaseField>,

Implementors§

§

impl ElementHasher for miden_processor::crypto::Blake3_192

§

impl ElementHasher for miden_processor::crypto::Blake3_256

§

impl ElementHasher for Rpo256

§

impl ElementHasher for GriffinJive64_256

§

impl ElementHasher for Rp62_248

§

type BaseField = BaseElement

§

impl ElementHasher for Rp64_256

§

impl ElementHasher for RpJive64_256

§

impl<B> ElementHasher for Blake3_192<B>
where B: StarkField,

§

type BaseField = B

§

impl<B> ElementHasher for Blake3_256<B>
where B: StarkField,

§

type BaseField = B

§

impl<B> ElementHasher for Sha3_256<B>
where B: StarkField,

§

type BaseField = B