31 #ifndef PTLIB_RANDOM_H 32 #define PTLIB_RANDOM_H 95 unsigned Generate(
unsigned minimum,
unsigned maximum);
113 static unsigned Number(
unsigned maximum);
117 static unsigned Number(
unsigned minimum,
unsigned maximum);
134 #endif // PTLIB_RANDOM_H
I recommend 8 for crypto, 4 for simulations.
Definition: random.h:121
PRandom()
Construct the random number generator.
DWORD randc
Definition: random.h:130
void SetSeed(DWORD seed)
Set the seed for the random number generator.
static unsigned Number()
Get the next psuedo-random number in sequence.
DWORD randa
Definition: random.h:128
DWORD randmem[RandSize]
Definition: random.h:127
DWORD randcnt
Definition: random.h:125
DWORD randrsl[RandSize]
Definition: random.h:126
DWORD randb
Definition: random.h:129
Mersenne Twister random number generator.
Definition: random.h:56
unsigned Generate()
Get the next psuedo-random number in sequence.