pub fn linux_random_u128() -> u128 ⓘ
Available on crate features
unsafe_syscall
and linux
only.Expand description
Generates a random u128
value that may not be criptographically secure.
It makes use of the GRND_NONBLOCK
and GRND_INSECURE
flags. So when the randomness
source is not ready, instead of blocking it may return less secure data in linux >= 5.6
or retry it a certain number of times, or even return 0 in some cases.