Skip to main content

random_mod_vartime_core

Function random_mod_vartime_core 

Source
pub(super) fn random_mod_vartime_core<T, R: TryRng + ?Sized>(
    rng: &mut R,
    x: &mut T,
    modulus: &NonZero<T>,
    n_bits: u32,
) -> Result<(), R::Error>
where T: Encoding + CtLt,
Expand description

Generic implementation of random_mod_vartime which can be shared with BoxedUint.