EntropyResult that either reports success
or the type of error that has occurred.
In case of an error, the data in buffer MUST NOT be used. The recommended way to check for success is through the isOK() helper function.
Retrieves random data from an applicable system CSPRNG.
buffer | An output buffer to store the retrieved entropy in. The length of it will determine the amount of random data to be obtained. This function (and all overloads) always attempt to fill the entire buffer. Therefore, they can block, spin or report an error. |
EntropyResult that either reports success
or the type of error that has occurred.
In case of an error, the data in buffer MUST NOT be used. The recommended way to check for success is through the isOK() helper function.
ditto
ditto Retrieves random data from an applicable system CSPRNG.
buffer | An output buffer to store the retrieved entropy in. |
length | Length of the provided buffer. Specifying a wrong value here, will lead to memory corruption. |
EntropyResult that either reports success
or the type of error that has occurred.
In case of an error, the data in buffer MUST NOT be used. The recommended way to check for success is through the isOK() helper function.
Retrieves random data from the requested entropy source.
In general, it’s a bad idea to let users pick sources themselves. A sane option should be used by default instead.
This overload only exists because its used by Phobos.
See_also: Use forceEntropySource instead.
buffer | An output buffer to store the retrieved entropy in. The length of it will determine the amount of entropy to be obtained. |
length | Length of the provided buffer. Specifying a wrong value here, will lead to memory corruption. |
source | The entropy source to use for the operation. |
EntropyResult that either reports success
or the type of error that has occurred.
In case of an error, the data in buffer MUST NOT be used. The recommended way to check for success is through the isOK() helper function.