BigInt.randomize

Fill BigInt with a random number with size of bitsize If set_high_bit is true, the highest bit will be set, which causes the entropy to be bits-1. Otherwise the highest bit is randomly choosen by the rng, causing the entropy to be bits.

struct BigInt
void
randomize
(,
size_t bitsize = 0
,
bool set_high_bit = true
)

Parameters

rng RandomNumberGenerator

the random number generator to use

bitsize size_t

number of bits the created random value should have

set_high_bit bool

if true, the highest bit is always set

Meta