Expand description
Deterministic, seeded RNG support for tests/benches.
EnumsΒ§
- Scene
- A named, reproducible RNG scene for tests. Each variant maps to a fixed seed.
ConstantsΒ§
- SEEDED_
STREAM π - When
Some,crate::rngreturns a handle that advances this single stream across allrng()calls on the thread (keeping IVs/nonces unique while reproducible).
FunctionsΒ§
- clear_
seed - Removes any thread-local seed, reverting
crate::rngto the OS entropy source on this thread. - fill_
bytes π - is_
seeded π - next_
u32 π - next_
u64 π - rng_
set_ scene - Seeds the current threadβs RNG with the deterministic seed for the given
Scene. - set_
seed_ raw - Sets up a deterministic, seeded ChaCha8 stream for the current thread.
Where possible, the higher level
rng_set_sceneshould be used instead.