Skip to main content

PRF

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

    // Required method
    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.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

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

Source§

type Input = Field<E>

Source§

type Output = Field<E>

Source§

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§