|
libdecaf
|
Sponge-based random-number generator. More...
#include <spongerng.hxx>
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. More... | |
| virtual void | read (Buffer buffer) DECAF_NOEXCEPT=0 |
| Read into a Buffer. More... | |
| SecureBuffer | read (size_t length) |
| Read into a SecureBuffer. | |
Public Member Functions inherited from decaf::Rng | |
| virtual void | read (Buffer buffer) DECAF_NOEXCEPT=0 |
| Read into a Buffer. More... | |
| 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. | |
Sponge-based random-number generator.
Deterministic flag.
The idea is that DETERMINISTIC is used for testing or for lockstep computations, and NONDETERMINISTIC is used in production.
|
inlinevirtual |
Read data to a buffer.
Implements decaf::Rng.
|
virtual |
Read into a Buffer.
Implements decaf::Rng.