ic_object_store

Function rand_bytes

Source
pub fn rand_bytes<const N: usize>() -> [u8; N]
Expand description

Generates an array of random bytes of specified size.

ยงExamples

use ic_object_store::rand_bytes;

let random_bytes: [u8; 32] = rand_bytes();
assert_eq!(random_bytes.len(), 32);