A small C++20 random-number generator library with multiple engines (LCG, PCG, Xoshiro, middle-square, Blum Blum Shub, and OS entropy) exposed as UniformRandomBitGenerators so you can use standard <random> distributions.
- General-purpose:
random_gen::pcg32
#include <random>
#include <random_gen/random_gen.hpp>
random_gen::pcg32 rng;
rng.seed(42);
std::uniform_int_distribution<int> dist(1, 6);
int roll = dist(rng);middle_square32and many LCGs are included for educational purposes and are not recommended when you need higher statistical quality.blum_blum_shub64here is intended for experimentation/learning; it is not a vetted cryptographic RNG implementation.
mkdir build && cd build
cmake ..
cmake --build .