Function random_bytes

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

Generate cryptographically secure random bytes

§Arguments

  • length - The number of bytes to generate

§Returns

A vector of random bytes

§Errors

Returns an error if random number generation fails