xoroshiro128++ PRNG. Extremely fast, not appropriate for cryptographic purposes.
Synopsis
Declared in <random.h>
class InsecureRandomContext
: public RandomMixin<InsecureRandomContext>
Description
Memory footprint is very small, period is 2ˆ128 ‐ 1. This class is not thread‐safe.
Reference implementation available at https://prng.di.unimi.it/xoroshiro128plusplus.c See https://prng.di.unimi.it/
Base Classes
Name |
Description |
Mixin class that provides helper randomness functions. |
Type Aliases
Name |
Description |
Result type of the generator, for the UniformRandomBitGenerator concept. |
Member Functions
Name |
Description |
|
Construct the context, deriving the initial state from a seed value. |
Assignment operators |
|
Reset the context to a new state derived from a seed value. |
|
Fill a span with random bytes. |
|
Generate the next random value, for the UniformRandomBitGenerator concept. |
|
Generate a random integer in its entire (non‐negative) range. |
|
generate a random uint256. |
|
Generate a random 32‐bit integer. |
|
Generate a random 64‐bit integer. |
|
Return a duration sampled from an exponential distribution (https://en.wikipedia.org/wiki/Exponential_distribution). Successive events whose intervals are distributed according to this form a memoryless Poisson process. This should be used for repeated network events (e.g. sending a certain type of message) to minimize leaking information to observers. |
|
Return the time point advanced by a uniform random duration. |
|
Generate a uniform random duration in the range from 0 (inclusive) to range (exclusive). |
|
|
|
Generate a random boolean. |
|
|
|
|
Static Member Functions
Protected Member Functions
Name |
Description |
Discard any random bits buffered from a previous rand64() call. |
Created with MrDocs