ChaCha

Type Alias ChaCha 

Source
pub type ChaCha<const ROUNDS: u32> = BlockPRNG<ChaChaStream<ROUNDS>>;
Expand description

The ChaCha based PRNG. It is a cryptographically secure PRNG.

§Notes

  • It is significantly slower than non-cryptographically secure PRNGS, e.g. around ~10x slower than LCG.
  • The recommended ROUNDS value is 20.

Aliased Type§

pub struct ChaCha<const ROUNDS: u32> { /* private fields */ }

Trait Implementations§

Source§

impl<const ROUNDS: u32> Splittable for ChaCha<ROUNDS>

Source§

fn split(&mut self) -> Self

Create a new PRNG from the current one. In a deterministic, yet non-obvious (pseudo random) way.
Source§

impl<const ROUNDS: u32> CryptographicallySecure for ChaCha<ROUNDS>