Trait snarkvm_wasm::traits::algorithms::PRFGadget[][src]

pub trait PRFGadget<P, F> where
    P: PRF,
    F: Field
{ type OutputGadget: EqGadget<F> + ToBytesGadget<F> + AllocGadget<<P as PRF>::Output, F> + Clone + Debug; fn new_seed<CS>(cs: CS, output: &<P as PRF>::Seed) -> Vec<UInt8, Global>
    where
        CS: ConstraintSystem<F>
;
fn check_evaluation_gadget<CS>(
        cs: CS,
        seed: &[UInt8],
        input: &[UInt8]
    ) -> Result<Self::OutputGadget, SynthesisError>
    where
        CS: ConstraintSystem<F>
; }

Associated Types

Required methods

fn new_seed<CS>(cs: CS, output: &<P as PRF>::Seed) -> Vec<UInt8, Global> where
    CS: ConstraintSystem<F>, 
[src]

fn check_evaluation_gadget<CS>(
    cs: CS,
    seed: &[UInt8],
    input: &[UInt8]
) -> Result<Self::OutputGadget, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

Implementors

impl<F> PRFGadget<Blake2s, F> for Blake2sGadget where
    F: PrimeField
[src]

type OutputGadget = Blake2sOutputGadget

pub fn new_seed<CS>(cs: CS, seed: &[u8; 32]) -> Vec<UInt8, Global> where
    CS: ConstraintSystem<F>, 
[src]

pub fn check_evaluation_gadget<CS>(
    cs: CS,
    seed: &[UInt8],
    input: &[UInt8]
) -> Result<<Blake2sGadget as PRFGadget<Blake2s, F>>::OutputGadget, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]