pub fn new_deterministic_rng(seed: [u8; 32]) -> LibQRngExpand description
Create a new deterministic RNG instance
This function creates a deterministic RNG suitable for testing and
reproducible operations. Output is a ChaCha20 stream from seed.
Unpredictability is only as strong as the seed; use new_secure_rng
for production cryptography.
§Arguments
seed- 32-byteChaCha20key (same interpretation asChaCha20Rng::from_seed)
§Examples
use lib_q_random::new_deterministic_rng;
use rand_core::Rng;
let mut rng = new_deterministic_rng([1; 32]);
let mut bytes = [0u8; 32];
rng.fill_bytes(&mut bytes);