[#InsecureRandomContext] = InsecureRandomContext :mrdocs: xoroshiro128++ PRNG. Extremely fast, not appropriate for cryptographic purposes. == Synopsis Declared in `<random.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class InsecureRandomContext : public xref:RandomMixin-01.adoc[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 [cols="1,4"] |=== | Name| Description | `xref:RandomMixin-01.adoc[RandomMixin<InsecureRandomContext>]` | Mixin class that provides helper randomness functions. |=== == Type Aliases [cols="1,4"] |=== | Name| Description | xref:InsecureRandomContext/result_type.adoc[`result_type`] | Result type of the generator, for the UniformRandomBitGenerator concept. |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:InsecureRandomContext/2constructor.adoc[`InsecureRandomContext`] [.small]#[constructor]# | Construct the context, deriving the initial state from a seed value. | xref:InsecureRandomContext/operator_assign-07.adoc[`operator=`] | Assignment operators | xref:InsecureRandomContext/Reseed.adoc[`Reseed`] | Reset the context to a new state derived from a seed value. | xref:InsecureRandomContext/fillrand.adoc[`fillrand`] | Fill a span with random bytes. | xref:InsecureRandomContext/operator_call.adoc[`operator()`] | Generate the next random value, for the UniformRandomBitGenerator concept. | xref:InsecureRandomContext/rand.adoc[`rand`] | Generate a random integer in its entire (non‐negative) range. | xref:InsecureRandomContext/rand256.adoc[`rand256`] | generate a random uint256. | xref:InsecureRandomContext/rand32.adoc[`rand32`] | Generate a random 32‐bit integer. | xref:InsecureRandomContext/rand64.adoc[`rand64`] | Generate a random 64‐bit integer. | xref:InsecureRandomContext/rand_exp_duration.adoc[`rand_exp_duration`] | 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. | xref:InsecureRandomContext/rand_uniform_delay.adoc[`rand_uniform_delay`] | Return the time point advanced by a uniform random duration. | xref:InsecureRandomContext/rand_uniform_duration.adoc[`rand_uniform_duration`] | Generate a uniform random duration in the range from 0 (inclusive) to range (exclusive). | xref:InsecureRandomContext/randbits-03.adoc[`randbits`] | `randbits` overloads | xref:InsecureRandomContext/randbool.adoc[`randbool`] | Generate a random boolean. | xref:InsecureRandomContext/randbytes-0e.adoc[`randbytes`] | `randbytes` overloads | xref:InsecureRandomContext/randrange-07c.adoc[`randrange`] | `randrange` overloads |=== == Static Member Functions [cols="1,4"] |=== | Name| Description | xref:InsecureRandomContext/max.adoc[`max`] | Largest value the generator can produce. | xref:InsecureRandomContext/min.adoc[`min`] | Smallest value the generator can produce. |=== == Protected Member Functions [cols="1,4"] |=== | Name| Description | xref:InsecureRandomContext/FlushCache.adoc[`FlushCache`] | Discard any random bits buffered from a previous rand64() call. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#