Function concrete_core::math::random::random_uniform_n_msb [−][src]
pub fn random_uniform_n_msb<T: RandomGenerable<UniformMsb>>(n: usize) -> T
Generates an unsigned integer whose n most significant bits are uniformly random, and the other bits are zero.
Example
let random: u8 = random_uniform_n_msb(3); assert!(random == 0 || random >= 32);