devela::sys::os::linux::io

Function linux_random_u64

Source
pub fn linux_random_u64() -> u64 
Available on crate features unsafe_syscall and linux only.
Expand description

Generates a random u64 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.