Skip to main content

random_bytes

Function random_bytes 

Source
pub fn random_bytes(len: usize) -> Result<Vec<u8>>
Expand description

Generate len cryptographically random bytes using the OS RNG.

ยงErrors

Returns WebAuthnError::InvalidClientData if the system RNG fails (extremely unlikely in practice).