Header for weakrng.c.
More...
Go to the source code of this file.
Header for weakrng.c.
Definition in file weakrng.h.
◆ tor_weak_random_one_in_n
Randomly return true according to rng with probability 1 in n
Definition at line 32 of file weakrng.h.
◆ tor_init_weak_random()
◆ tor_weak_random()
Return a randomly chosen value in the range 0..TOR_WEAK_RANDOM_MAX based on the RNG state of rng. This entropy will not be cryptographically strong; do not rely on it for anything an adversary should not be able to predict.
Definition at line 32 of file weakrng.c.
◆ tor_weak_random_range()
Return a random number in the range [0 , top). {That is, the range of integers i such that 0 <= i < top.} Chooses uniformly. Requires that top is greater than 0. This randomness is not cryptographically strong; do not rely on it for anything an adversary should not be able to predict.
Definition at line 48 of file weakrng.c.