scclib
Stable Cloud Computing C++ Library
|
The random number generator is initialized with random entropy on first use. More...
#include <random.h>
Public Types | |
typedef int | result_type |
Required for UniformRandomBitGenerator interface. | |
Public Member Functions | |
int | operator() () |
Required for UniformRandomBitGenerator interface. | |
constexpr int | min () |
Required for UniformRandomBitGenerator interface. | |
constexpr int | max () |
Required for UniformRandomBitGenerator interface. | |
Static Public Member Functions | |
static void * | ctx () |
Opaque reference to the number generator. | |
static void | lock () |
Lock the number generator while the opaque reference is in use. | |
static void | unlock () |
Unlock the number generator. | |
static void | random_seed () |
Generate a random seed and seed the generator with it. | |
static void | seed (const void *, int len) |
Seed the generator. | |
static void | seed (const std::string &buf) |
Seed the generator. | |
static void | rand_bytes (void *, int len) |
Generate random bytes. | |
static uint32_t | rand_uint32 () |
Generate random word. | |
static int32_t | rand_int32 () |
Generate random word. | |
static uint64_t | rand_uint64 () |
Generate random long word. | |
static int64_t | rand_int64 () |
Generate random long word. | |
The random number generator is initialized with random entropy on first use.
The same seed will generate different bit sequences between runs.