pub trait PRF {
    type Seed;
    type Input;
    type Output;

    fn prf(
        &self,
        seed: &Self::Seed,
        input: &[Self::Input]
    ) -> Result<Self::Output, Error>; }
Expand description

A trait for a pseudorandom function.

Required Associated Types§

Required Methods§

source

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

Returns the output for the given seed and input.

Implementations on Foreign Types§

source§

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

§

type Input = Field<E>

§

type Output = Field<E>

§

type Seed = Field<E>

source§

fn prf(
    &self,
    seed: &<Poseidon<E, RATE> as PRF>::Seed,
    input: &[<Poseidon<E, RATE> as PRF>::Input]
) -> Result<<Poseidon<E, RATE> as PRF>::Output, Error>

Implementors§