dcrypt.random.urandom

Members

Classes

URandomRNG
class URandomRNG

URandomRNG provides an interface to the /dev/urandom RNG of most Unix like systems.

Examples

Test /dev/urandom based PRNG.

1 URandomRNG rng = new URandomRNG;
2 
3 ubyte[16] buf;
4 
5 assert(rng.isAvailable);
6 
7 rng.nextBytes(buf);
8 
9 assert(buf != x"000000000000000000000000000000", "failed to get entropy from /dev/urandom");

Meta