Loading...
Searching...
No Matches
decaf::SpongeRng Class Reference

Sponge-based random-number generator. More...

`#include <spongerng.hxx>`

Inheritance diagram for decaf::SpongeRng:

## Classes

class | RngException
| Exception thrown when The RNG fails (to seed itself) More...

## Public Types

enum | Deterministic { RANDOM = 0 , DETERMINISTIC = 1 }
| Deterministic flag. More...

## Public Member Functions

| SpongeRng (const Block &in, Deterministic det)
| Initialize, deterministically by default, from block.
| SpongeRng (const std::string &in="/dev/urandom", size_t len=32, Deterministic det=RANDOM)
| Initialize, non-deterministically by default, from C/C++ filename.
void | stir (const Block &data) DECAF_NOEXCEPT
| Stir in new data.
| ~SpongeRng () DECAF_NOEXCEPT
| Securely destroy by overwriting state.
virtual void | read (Buffer buffer) DECAF_NOEXCEPT
| Read data to a buffer.
virtual void | read (Buffer buffer) DECAF_NOEXCEPT=0
| Read into a Buffer.
SecureBuffer | read (size_t length)
| Read into a SecureBuffer.
Public Member Functions inherited from decaf::Rng
SecureBuffer | read (size_t length)
| Read into a SecureBuffer.

## Additional Inherited Members

Protected Member Functions inherited from decaf::Rng
| Rng ()
| Empty initializer.
| Rng (const Rng &) DECAF_DELETE
| Not copyable.
Rng & | operator= (const Rng &) DECAF_DELETE
| Not copyable.

## Detailed Description

Sponge-based random-number generator.

## Member Enumeration Documentation

## Deterministic

enum decaf::SpongeRng::Deterministic

Deterministic flag.

The idea is that DETERMINISTIC is used for testing or for lockstep computations, and NONDETERMINISTIC is used in production.

## Member Function Documentation

## read() [1/2]

virtual void decaf::SpongeRng::read | ( | Buffer | buffer | ) |

inline virtual

Read data to a buffer.

Implements decaf::Rng.

## read() [2/2]

virtual void decaf::Rng::read | ( | Buffer | buffer | ) |

virtual

Read into a Buffer.

Implements decaf::Rng.

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

- src/GENERATED/include/decaf/spongerng.hxx