CryptoSys PKI
23.0.0
|
Random Number Generator to NIST SP800-90. More...
Public Types | |
enum | Opts : unsigned int |
Rng options More... | |
Static Public Member Functions | |
static bvec_t | Bytes (int n) |
Generate an array of random bytes. More... | |
static std::string | Guid () |
Generate a random 36-character Global Unique IDentifier (GUID) string according to RFC4122. More... | |
static int | Initialize (const std::string &seedFile) |
Initialize the RNG generator using a seed file. More... | |
static int | InitializeEx (Opts opts=Opts::Default) |
Query and initialize the RNG generator using Intel(R) DRNG, if available. More... | |
static int | Number (int lower, int upper) |
Generate a random integer in a given range. More... | |
static int | Octet () |
Generate a single random octet (byte) More... | |
static int | UpdateSeedFile (const std::string &seedFile) |
Update the RNG seed file with more entropy. More... | |
Random Number Generator to NIST SP800-90.
enum dipki::Rng::Opts : unsigned int |
|
static |
Generate an array of random bytes.
n | Required number of random bytes |
|
static |
Generate a random 36-character Global Unique IDentifier (GUID) string according to RFC4122.
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
where 'x' is a hexadecimal digit [0-9a-f]
.
|
static |
Initialize the RNG generator using a seed file.
seedFile | Full path name of seed file. |
|
static |
Query and initialize the RNG generator using Intel(R) DRNG, if available.
opts | Option flags (optional) |
|
static |
Generate a random integer in a given range.
lower | lower value of range |
upper | upper value of range |
lower <= x <= upper
|
static |
Generate a single random octet (byte)
|
static |
Update the RNG seed file with more entropy.
seedFile | Full path name of seed file. |