Skip to main content

Module seeded

Module seeded 

Source
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::rng returns a handle that advances this single stream across all rng() calls on the thread (keeping IVs/nonces unique while reproducible).

FunctionsΒ§

clear_seed
Removes any thread-local seed, reverting crate::rng to 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_scene should be used instead.