[][src]Module nanorand::entropy

Sources for obtaining entropy.

Functions

backup_entropy

A backup entropy source, trying rdseed first, and if it fails or does not complete, combining it with or using system time-based entropy generation.

emergency_system_time_entropy

An emergency system time-based entropy source. Should be slightly better than just piping the system time into a seed, but for the love of god, don't use this unless you have a REALLY good reason.

entropy_from_system

Pull in system entropy using the getrandom crate. Uses backup entropy (rdseed and system time) if it fails.

rdseed_entropy

An rdseed-based entropy source. Only works on x86/x86_64 platforms where the rdseed instructions are available. Returns None if rdseed is not available. Returns Some if it successfully managed to pull some bytes. VERY unreliable.