Fills the buffer with random values using the Hash_DRBG algorithm.
Fills the buffer with random values using the Hash_DRBG algorithm.
Further improve security by setting Hash_DRBG's optional "additional input" for each call to read(). This can be set to a new value before each read() call for maximum effect.
If your security needs are high enough that you'd rather risk blocking for an arbitrarily-long period of time while sufficient system entropy builds, than risk generating values from potentially insufficient entropy (ex, if you'd rather reseed from Linux's /dev/random than /dev/urandom), then set this to Yes.PredictionResistance. The next time a value is generated, the internal state will first be replenished with additional entropy, potentially from a blocking source.
The underlying stream-like interface for SystemEntropy.
TSHA: Any SHA-1 or SHA-2 digest type. Default is SHA512.
custom: The Hash_DRBG algorithm's personalization string. You can optionally set this to any specific value of your own choosing for improved security.
EntropyStream: The source of entropy from which to draw. The default is SystemEntropyStream!(), but can be overridden. If you provide your own, then it's your responsibility to ensure your entropy source is non-deterministic.
Because std.stream is pending a full replacement, be aware that stream-like random number generators currently use a temporary design that may change once a new std.stream is available.
Declaration: