Skip to content

Class Ase::KeccakGoodRng

ClassList > Ase > KeccakGoodRng

More...

  • #include <randomhash.hh>

Inherits the following classes: Ase::KeccakRng

Public Types inherited from Ase::KeccakRng

See Ase::KeccakRng

Type Name
typedef uint64_t result_type
Integral type of the KeccakRng generator results.

Public Functions

Type Name
KeccakGoodRng ()
Initialize and seed the generator from a system specific nondeterministic random source.
KeccakGoodRng (SeedSeq & seed_sequence)
Initialize and seed the generator from seed_sequence .

Public Functions inherited from Ase::KeccakRng

See Ase::KeccakRng

Type Name
KeccakRng (const KeccakRng &) = default
KeccakRng (uint16_t hidden_state_capacity, uint16_t n_rounds)
Create an unseeded Keccak PRNG with specific capacity and number of rounds, for experts only.
void auto_seed ()
Seed the generator from a system specific nondeterministic random source.
size_t bit_capacity () const
Amount of bits used to store hidden random number generator state.
void discard (unsigned long long count)
void forget ()
void generate (RandomAccessIterator begin, RandomAccessIterator end)
Fill the range [begin, end) with random unsigned integer values.
result_type max () const
Maximum of the result type, for uint64_t that is 18446744073709551615.
result_type min () const
Minimum of the result type, for uint64_t that is 0.
size_t n_nums () const
Amount of 64 bit random numbers per generated block.
result_type operator() ()
Generate uniformly distributed 32 bit pseudo random number.
uint64_t random ()
void seed (uint64_t seed_value=1)
Reinitialize the generator state using a 64 bit seed_value .
void seed (const uint64_t * seeds, size_t n_seeds)
Reinitialize the generator state using a nuber of 64 bit seeds .
void seed (SeedSeq & seed_sequence)
Seed the generator state from a seed_sequence .
void xor_seed (const uint64_t * seeds, size_t n_seeds)
~KeccakRng ()
The destructor resets the generator state to avoid leaving memory trails.

Detailed Description

KeccakGoodRng - A KeccakF1600 based good quality pseudo-random number generator. This class provides very good random numbers, using the KeccakF1600 algorithm without the extra security margins applied for SHA3 hash generation. This improves performance significantly without noticably trading random number quality. For cryptography grade number generation KeccakCryptoRng should be used instead.

Public Functions Documentation

function KeccakGoodRng [1/2]

inline explicit Ase::KeccakGoodRng::KeccakGoodRng () 

function KeccakGoodRng [2/2]

template<class SeedSeq>
inline explicit Ase::KeccakGoodRng::KeccakGoodRng (
    SeedSeq & seed_sequence
) 


The documentation for this class was generated from the following file /__w/anklang/anklang/ase/randomhash.hh