pub trait HashToScalar {
    type Input;
    type Scalar: ScalarTrait;

    // Required method
    fn hash_to_scalar(&self, input: &[Self::Input]) -> Self::Scalar;
}
Expand description

A trait for a hash function that projects the value to a scalar.

Required Associated Types§

Required Methods§

source

fn hash_to_scalar(&self, input: &[Self::Input]) -> Self::Scalar

Returns the hash of the given input.

Implementors§

source§

impl<E, const RATE: usize> HashToScalar for Poseidon<E, RATE>where E: Environment,

§

type Input = Field<E>

§

type Scalar = Scalar<E>