A static class that wraps the random-number generation code of your platform.
More...
#include <Random.hxx>
A static class that wraps the random-number generation code of your platform.
Definition at line 53 of file Random.hxx.
◆ anonymous enum
◆ getCryptoRandom() [1/3]
| int Random::getCryptoRandom |
( |
| ) |
|
|
static |
◆ getCryptoRandom() [2/3]
| void Random::getCryptoRandom |
( |
unsigned char * |
buf, |
|
|
unsigned int |
numBytes |
|
) |
| |
|
static |
◆ getCryptoRandom() [3/3]
| Data Random::getCryptoRandom |
( |
unsigned int |
numBytes | ) |
|
|
static |
◆ getCryptoRandomBase64()
| Data Random::getCryptoRandomBase64 |
( |
unsigned int |
numBytes | ) |
|
|
static |
◆ getCryptoRandomHex()
| Data Random::getCryptoRandomHex |
( |
unsigned int |
numBytes | ) |
|
|
static |
◆ getImplName()
| const char * Random::getImplName |
( |
| ) |
|
|
static |
◆ getRandom() [1/2]
| int Random::getRandom |
( |
| ) |
|
|
static |
Returns a postive integer (31 bits) of randomness.
Implementation is platform dependent.
Definition at line 261 of file Random.cxx.
◆ getRandom() [2/2]
| Data Random::getRandom |
( |
unsigned int |
numBytes | ) |
|
|
static |
◆ getRandomBase64()
| Data Random::getRandomBase64 |
( |
unsigned int |
numBytes | ) |
|
|
static |
◆ getRandomHex()
| Data Random::getRandomHex |
( |
unsigned int |
numBytes | ) |
|
|
static |
◆ getSimpleSeed()
| unsigned Random::getSimpleSeed |
( |
| ) |
|
|
static |
Key goal is to make sure that each thread has distinct seed.
Definition at line 102 of file Random.cxx.
◆ getVersion4UuidUrn()
| Data Random::getVersion4UuidUrn |
( |
| ) |
|
|
static |
Returns a version 4 (random) UUID as defined in RFC 4122.
- Todo:
- This is something of a suboptimal hack. Ideally, we would encapsulate UUID as its own class, with options to create any of versions 1 through 5 (and Nil UUIDs). This class would have various access methods to pull the result out as a bitstring, as raw data, as a URN, etc. For what I need to do right now, however, version 4 UUIDs get me where I need to go. <abr>
Definition at line 436 of file Random.cxx.
◆ initialize()
| void Random::initialize |
( |
| ) |
|
|
static |
ah! blocks if /dev/random on embedded sys
Definition at line 125 of file Random.cxx.
The documentation for this class was generated from the following files: