C/C++ API Reference
Loading...
Searching...
No Matches
pw::random::RandomGenerator Class Referenceabstract

Overview

A random generator uses injected entropy to generate random values. Many of the guarantees for this interface are provided at the level of the implementations. In general:

  • DO assume a generator will always succeed.
  • DO NOT assume a generator is cryptographically secure.
  • DO NOT assume uniformity of generated data.
Inheritance diagram for pw::random::RandomGenerator:
pw::random::XorShiftStarRng64

Public Member Functions

template<class T >
void GetInt (T &dest)
 
template<class T >
void GetInt (T &dest, const T &exclusive_upper_bound)
 
virtual void Get (ByteSpan dest)=0
 
virtual void InjectEntropyBits (uint32_t data, uint_fast8_t num_bits)=0
 
void InjectEntropy (ConstByteSpan data)
 Injects entropy into the pool byte-by-byte.
 

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