Skip to main content

randombytes_buf

Function randombytes_buf 

Source
pub fn randombytes_buf(buf: &mut [u8]) -> Result<(), RandomError>
Expand description

Fills buf with cryptographically secure random bytes from the OS CSPRNG.

ยงErrors

Returns RandomError if the OS CSPRNG is unavailable or fails.