Skip to content

Commit 51d27a9

Browse files
authored
ReseedingRng: fix doc comment on reseeding behavior after UNIX fork (#1317)
It reads "For ChaCha and Hc128 this is a maximum of fifteen `u32` values before reseeding" while rand_chacha v0.2.0 or higher actually consumes 63 `u32` values before reseeding.
1 parent a747b1d commit 51d27a9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/rngs/adapter/reseeding.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ use rand_core::{CryptoRng, Error, RngCore, SeedableRng};
2424
/// - After `clone()`, the clone will be reseeded on first use.
2525
/// - When a process is forked on UNIX, the RNGs in both the parent and child
2626
/// processes will be reseeded just before the next call to
27-
/// [`BlockRngCore::generate`], i.e. "soon". For ChaCha and Hc128 this is a
28-
/// maximum of fifteen `u32` values before reseeding.
27+
/// [`BlockRngCore::generate`], i.e. "soon". For ChaCha and Hc128, this is a
28+
/// maximum of 63 and 15, respectively, `u32` values before reseeding.
2929
/// - After the PRNG has generated a configurable number of random bytes.
3030
///
3131
/// # When should reseeding after a fixed number of generated bytes be used?

0 commit comments

Comments
 (0)