Module lair_keystore_api::dependencies::sodoken::random
Expand description
Api functions related to cryptographically secure randomness / entropy.
§Example
let salt: sodoken::BufWriteSized<{ sodoken::hash::argon2id::SALTBYTES }> =
sodoken::BufWriteSized::new_no_lock();
sodoken::random::bytes_buf(salt.clone()).await.unwrap();
let salt = salt.to_read_sized();
Functions§
- Fill a buffer with cryptographically secure randomness