libdecaf
|
Sponge-based random-number generator. More...
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. | |
![]() | |
SecureBuffer | read (size_t length) |
Read into a SecureBuffer. | |
Additional Inherited Members | |
![]() | |
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.