[][src]Trait num_bigint_dig::RandBigInt

pub trait RandBigInt {
    pub fn gen_biguint(&mut self, bit_size: usize) -> BigUint;
pub fn gen_bigint(&mut self, bit_size: usize) -> BigInt;
pub fn gen_biguint_below(&mut self, bound: &BigUint) -> BigUint;
pub fn gen_biguint_range(
        &mut self,
        lbound: &BigUint,
        ubound: &BigUint
    ) -> BigUint;
pub fn gen_bigint_range(
        &mut self,
        lbound: &BigInt,
        ubound: &BigInt
    ) -> BigInt; }

Required methods

pub fn gen_biguint(&mut self, bit_size: usize) -> BigUint[src]

Generate a random BigUint of the given bit size.

pub fn gen_bigint(&mut self, bit_size: usize) -> BigInt[src]

Generate a random BigInt of the given bit size.

pub fn gen_biguint_below(&mut self, bound: &BigUint) -> BigUint[src]

Generate a random BigUint less than the given bound. Fails when the bound is zero.

pub fn gen_biguint_range(
    &mut self,
    lbound: &BigUint,
    ubound: &BigUint
) -> BigUint
[src]

Generate a random BigUint within the given range. The lower bound is inclusive; the upper bound is exclusive. Fails when the upper bound is not greater than the lower bound.

pub fn gen_bigint_range(&mut self, lbound: &BigInt, ubound: &BigInt) -> BigInt[src]

Generate a random BigInt within the given range. The lower bound is inclusive; the upper bound is exclusive. Fails when the upper bound is not greater than the lower bound.

Loading content...

Implementors

impl<R: Rng + ?Sized> RandBigInt for R[src]

Loading content...