Class HashMixerRNG(Hash, uint factor)
Hash-based cryptographically secure random number mixer.
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.
Inherits from
-
(base class)Object
Parameters
Name | Description |
---|
Hash
The hash function used, for example SHA1
factor
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.
Constructors
Name | Description |
---|---|
this
|
Creates new hash-based mixer random generator. |
Fields
Name | Type | Description |
---|---|---|
rng
|
SystemRNG |
Methods
Name | Description |
---|---|
dataAvailableForRead
|
|
empty
|
|
leastSize
|
|
peek
|
|
read
|
Authors
Ilya Shipunov
Copyright
© 2013 RejectedSoftware e.K.
License
Subject to the terms of the MIT license, as written in the included LICENSE.txt file.