pub trait RandomField<F> {
    // Required methods
    fn gen_field_with_bits(&mut self, bits: usize) -> F;
    fn gen(&mut self, input: Option<F>, bits: Option<usize>) -> F;
}
Expand description

Helper to generate random field elements

Required Methods§

source

fn gen_field_with_bits(&mut self, bits: usize) -> F

Generates a random field element of up to a given number of bits

source

fn gen(&mut self, input: Option<F>, bits: Option<usize>) -> F

Initialize a random input with a random value of given length

Implementations on Foreign Types§

source§

impl<F: PrimeField> RandomField<F> for StdRng

source§

fn gen_field_with_bits(&mut self, bits: usize) -> F

source§

fn gen(&mut self, input: Option<F>, bits: Option<usize>) -> F

Implementors§