pub trait HashToScalar {
    type Input;
    type Output;

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

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

Required Associated Types§

type Input

type Output

Required Methods§

fn hash_to_scalar(&self, input: &[Self::Input]) -> Result<Self::Output, Error>

Returns the hash of the given input.

Implementors§

source§

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

§

type Input = Field<E>

§

type Output = Scalar<E>