Crypto++

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions
LC_RNG Class Reference

linear congruential generator More...

`#include <rng.h>`

Inheritance diagram for LC_RNG:

List of all members.

## Public Member Functions

| LC_RNG (word32 init_seed)
void | GenerateBlock (byte *output, size_t size)
| generate random array of bytes
word32 | GetSeed ()
virtual void | IncorporateEntropy (const byte *input, size_t length)
| update RNG state with additional unpredictable values
virtual bool | CanIncorporateEntropy () const
| returns true if IncorporateEntropy is implemented
virtual 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 | DiscardBytes (size_t n)
| generate and discard n bytes
virtual void | GenerateIntoBufferedTransformation (BufferedTransformation &target, const std::string &channel, lword length)
| generate random bytes as input to a BufferedTransformation
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

## Detailed Description

linear congruential generator

originally by William S. England, do not use for cryptographic purposes

Definition at line 13 of file rng.h.

## Member Function Documentation

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

generate new random bit and return it

Default implementation is to call GenerateByte() and return its lowest bit.

Reimplemented in PublicBlumBlumShub.

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

- rng.h