Class Entropy.

Inherits Garbage

The Entropy class provides entropy.

When someone in Archiveopteryx needs entropy, Entropy provides it, in the form of a string or a number.

If true entropy isn't available, Entropy provides cryptographically strong pseudorandom numbers.

static uint Entropy::asNumber( uint bytes )

Returns the desired number of bytes of entropy as a number. bytes must be between 1 and 4 inclusive, since some supported architectures have only four-byte integers.

static EString Entropy::asString( uint bytes )

Returns the desired bytes of entropy as a string. Throws an exception if entropy isn't available.

static void Entropy::setup()

Sets up the entropy gatherer.

This web page based on source code belonging to The Archiveopteryx Developers. All rights reserved.