Trait miden_processor::crypto::ElementHasher

source ·
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§

source

type BaseField: StarkField

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

Required Methods§

source

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§

source§

impl ElementHasher for Blake3_160

source§

impl ElementHasher for Rpx256

§

type BaseField = BaseElement

source§

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

Implementors§

source§

impl ElementHasher for Rp62_248

source§

impl ElementHasher for Rp64_256

source§

impl ElementHasher for RpJive64_256

source§

impl ElementHasher for miden_processor::crypto::Blake3_192

source§

impl ElementHasher for miden_processor::crypto::Blake3_256

source§

impl ElementHasher for Rpo256

source§

impl<B> ElementHasher for winter_crypto::hash::blake::Blake3_192<B>
where B: StarkField,

§

type BaseField = B

source§

impl<B> ElementHasher for winter_crypto::hash::blake::Blake3_256<B>
where B: StarkField,

§

type BaseField = B

source§

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

§

type BaseField = B