Skip to main content

Module entropy

Module entropy 

Source
Expand description

OS CSPRNG bytes for crate::CapId.

getrandom::getrandom reads the platform generator (ProcessPrng on Windows, getrandom / /dev/urandom on Linux). A failed read is EntropyError and keeps the OS error. This module does not substitute a hash.

Structs§

EntropyError
The operating system refused or failed the entropy read.

Functions§

fill_bytes
Fill buf with OS CSPRNG bytes. An empty buffer succeeds. Never panics.