randomstate.entropy.
random_entropy
(size=None, source='system')¶Read entropy from the system cryptographic provider
Parameters: |
|
---|---|
Returns: | entropy – Entropy bits in 32-bit unsigned integers |
Return type: | scalar or ndarray |
Notes
On Unix-like machines, reads from /dev/urandom
. On Windows machines
reads from the RSA algorithm provided by the cryptographic service
provider.
This function reads from the system entropy pool and so samples are
not reproducible. In particular, it does NOT make use of a
RandomState, and so seed
, get_state
and set_state
have no
effect.
Raises RuntimeError if the command fails.