pub fn gen_nonce(size: usize) -> Vec<u8>
Expand description

Generate a cryptographically secure random nonce of the given size in bytes

Arguments

  • size - Size of the nonce in bytes

Examples

use aether_lib::util::gen_nonce;
// to generate a 16 bytes nonce
let nonce = gen_nonce(16);