randbytes (
nbytes,
prng=1,
wait=0,
)
Get nbytes number of bytes of randomness if possible.
If prng is true, pseudo-randomly generated data of unknown quality
is OK. If false, only crypto-quality entropy is acceptable.
If wait is true, caller is willing to wait an unspecified period of time
in exchange for better quality randomness. If false, return the best
randomness presently available.
If the constraints cannot be met, return None.
|