RandomNumberGenerator

This class represents a random number (RNG) generator object.

Members

Functions

addEntropy
void addEntropy(const(ubyte)* input, size_t length)

Add entropy to this RNG.

clear
void clear()

Clear all internally held values of this RNG.

isSeeded
bool isSeeded()

Check whether this RNG is seeded.

nextByte
ubyte nextByte()

Return a random ubyte

randomVec
SecureVector!ubyte randomVec(size_t bytes)

Return a random vector

randomize
void randomize(ubyte* output, size_t length)

Randomize a ubyte array.

reseed
void reseed(size_t bits_to_collect)

Seed this RNG using the entropy sources it contains.

Properties

name
string name [@property getter]

Return the name of this object

Static functions

makeRng
RandomNumberGenerator makeRng()

Create a seeded and active RNG object for general application use Added in 1.8.0

makeRng
RandomNumberGenerator makeRng(AlgorithmFactory af)

Create a seeded and active RNG object for general application use Added in 1.11.5

Meta