chloride.random

Undocumented in source.

Members

Functions

fillRandom
void fillRandom(void[] buf)

Fill buf with cryptographic random data.

random
T random()

Get a single random Integer of type T. T can be any integral type with four or fewer bytes.

random
uint random(uint n)

Get a random integer between 0 and n (excluded). It does its best to guarantee a uniform distribution.

randomArray
U randomArray()

Create an array of n elements filled with random data. The array can be static or dynamic. If the array is dynamic, the size must be passed as a runtime argument.

randomArray
U randomArray(int n)
randomByteRange
RandomByteRange randomByteRange()

Create an instance of RandomByteRange

randomBytes
ubyte[] randomBytes(int n)

Allocate n bytes of cryptographic random data.

Structs

RandomByteRange
struct RandomByteRange

An input range that generates random bytes.

Meta