ddn.api.crypto.random

Random number generation API.

Types 1

interfaceCryptoRandom

Interface for a cryptographically secure random number generator.

Named CryptoRandom (not Random) so importing this module together with std.random cannot silently resolve to the non-cryptographic Mersenne Twister alias.

Methods
void nextBytes(ubyte[] buffer)Fills the provided buffer with random bytes.
uint nextUint()Generates a random unsigned 32-bit integer.
ulong nextUlong()Generates a random unsigned 64-bit integer.
uint nextUintBound(uint bound)Generates a random unsigned integer in the half-open interval `[0, bound)`.