Create a new random number generator
Controls oversampling, pass 1
to not oversample. Default is 1
.
Internal flags changes the bahaviour of the TRNG. Default is NONE
.
Flag that indicates current instance is in use. While this is true, anyone want to gather bytes or numbers from this instance will throws error. It is because the undely mechanism is not thread-safe, attempt to use the same undely collector instance in parallel will interrupt the state and may crashes the whole process.
Get a buffer that fills with random bytes.
How many bytes should be in the buffer.
A buffer fill with random bytes, but keep in mind that it still has chance that entropy does not enough to fufill the count requested.
Generate a float-point number between 0 and 1.
Generate a float-point number between 0 and the value given.
The number that generated number must not greater or equals to
Generate a float-point number between the values given.
The number that generated number must not smaller to
The number that generated number must not greater or equals to
How many bytes will be used to get the number. Minimum is 1 (1 / 256 fragments), maximum is 6 (1 / 281,474,976,710,656 fragments), default is 6
Generate an integer number between 0 and the value given.
The number that generated number must not greater or equals to
Generate an integer number between the values given.
The number that generated number must not smaller to
The number that generated number must not greater or equals to
Collect some random bytes from the Jitterentropy with provided buffer.
The buffer object to contain the random bytes.
How many bytes to be collected, maximum is the buffer size.
A number that indicates how many bytes has been collected to the buffer.
Zero or negative values means something wrong is happened,
please refer to mandoc Jitterentropy(3)
for details.
Generated using TypeDoc
Wrapper for Jitterentropy True Random Number Generator