#include <cryptlib.h>
Inheritance diagram for RandomNumberGenerator:

Public Methods | |
| virtual | ~RandomNumberGenerator () |
| virtual byte | GenerateByte ()=0 |
| generate new random byte and return it. | |
| virtual unsigned int | GenerateBit () |
| generate new random bit and return it. More... | |
| virtual word32 | GenerateWord32 (word32 a=0,word32 b=0xffffffffL) |
| generate a random 32 bit word in the range min to max, inclusive. More... | |
| virtual void | GenerateBlock (byte *output,unsigned int size) |
| generate random array of bytes. More... | |
| template<class IT> void | Shuffle (IT begin,IT end) |
| randomly shuffle the specified array, resulting permutation is uniformly distributed. More... | |
| byte | GetByte () |
| unsigned int | GetBit () |
| word32 | GetLong (word32 a=0,word32 b=0xffffffffL) |
| word16 | GetShort (word16 a=0,word16 b=0xffff) |
| void | GetBlock (byte *output,unsigned int size) |
All return values are uniformly distributed over the range specified.
Definition at line 160 of file cryptlib.h.
|
|
Definition at line 164 of file cryptlib.h. |
|
|
generate new random bit and return it. Default implementation is to call GenerateByte() and return its parity. Reimplemented in PublicBlumBlumShub. Definition at line 14 of file cryptlib.cpp. |
|
|
generate random array of bytes.
Reimplemented in NonblockingRng, BlockingRng, and RandomPool. Definition at line 19 of file cryptlib.cpp. Referenced by SecretSharing::Put(). |
|
|
generate a random 32 bit word in the range min to max, inclusive.
Definition at line 25 of file cryptlib.cpp. Referenced by Shuffle(). |
|
|
Definition at line 189 of file cryptlib.h. |
|
|
Definition at line 192 of file cryptlib.h. |
|
|
Definition at line 188 of file cryptlib.h. |
|
|
Definition at line 190 of file cryptlib.h. |
|
|
Definition at line 191 of file cryptlib.h. |
|
||||||
|
randomly shuffle the specified array, resulting permutation is uniformly distributed.
Definition at line 181 of file cryptlib.h. |
1.2.4 written by Dimitri van Heesch,
© 1997-2000