Asynchronous I/O that doesn’t get in your way, written in D
Hash-based cryptographically secure random number mixer.
class HashMixerRNG(Hash, uint factor)
This RNG uses a hash function to mix a specific amount of random bytes from the input RNG.
Use only cryptographically secure hash functions like SHA-512, Whirlpool or SHA-256, but not MD5.
The hash function used, for example SHA1
Determines how many times the hash digest length of input data
is used as input to the hash function. Increase factor value if you
need more security because it increases entropy level or decrease
the factor value if you need more speed.