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§
sourcetype BaseField: StarkField
type BaseField: StarkField
Specifies a base field for elements which can be hashed with this hasher.
Required Methods§
sourcefn hash_elements<E>(elements: &[E]) -> Self::Digestwhere
E: FieldElement<BaseField = Self::BaseField>,
fn hash_elements<E>(elements: &[E]) -> Self::Digestwhere
E: FieldElement<BaseField = Self::BaseField>,
Returns a hash of the provided field elements.
Object Safety§
This trait is not object safe.