Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

# AutoSeededX917RNG< BLOCK_CIPHER > Class Template Reference

`#include <osrng.h>`

Inheritance diagram for AutoSeededX917RNG< BLOCK_CIPHER >:

List of all members.

## Detailed Description

### template<class BLOCK_CIPHER>
class AutoSeededX917RNG< BLOCK_CIPHER >

RNG from ANSI X9.17 Appendix C, seeded using an OS provided RNG.

Definition at line 93 of file osrng.h.

## Public Member Functions
| AutoSeededX917RNG (bool blocking=false)
| blocking will be ignored if the prefered RNG isn't available
void | Reseed (bool blocking=false)
void | Reseed (const byte *key, unsigned int keylength, const byte *seed, unsigned long timeVector)
byte | GenerateByte ()
| generate new random byte and return it
virtual unsigned int | GenerateBit ()
| generate new random bit and return it
virtual word32 | GenerateWord32 (word32 a=0, word32 b=0xffffffffL)
| generate a random 32 bit word in the range min to max, inclusive
virtual void | GenerateBlock (byte *output, unsigned int size)
| generate random array of bytes
virtual void | DiscardBytes (unsigned int n)
| generate and discard n bytes
template<class IT> void | Shuffle (IT begin, IT end)
| randomly shuffle the specified array, resulting permutation is uniformly distributed
virtual std::string | AlgorithmName () const
| returns name of this algorithm, not universally implemented yet
virtual Clonable * | Clone () const
| this is not implemented by most classes yet

## Member Function Documentation

unsigned int RandomNumberGenerator::GenerateBit | ( |  | ) | `[virtual, inherited]`

| generate new random bit and return it Default implementation is to call GenerateByte() and return its parity. Reimplemented in PublicBlumBlumShub. Definition at line 86 of file cryptlib.cpp. References RandomNumberGenerator::GenerateByte().

void RandomNumberGenerator::GenerateBlock | ( | byte * | output,
|  | unsigned int | size
| ) | `[virtual, inherited]`

| generate random array of bytes Default implementation is to call GenerateByte() size times. Reimplemented in NonblockingRng, BlockingRng, and RandomPool. Definition at line 91 of file cryptlib.cpp. References RandomNumberGenerator::GenerateByte(). Referenced by DL_GroupParameters_DSA::GenerateRandom().

void RandomNumberGenerator::DiscardBytes | ( | unsigned int | n | ) | `[virtual, inherited]`

| generate and discard n bytes Default implementation is to call GenerateByte() n times. Reimplemented in ARC4_Base. Definition at line 117 of file cryptlib.cpp. References RandomNumberGenerator::GenerateByte().

The documentation for this class was generated from the following file:

- osrng.h