# Crate `reseeding_rng`
[](https://crates.io/crates/reseeding_rng)
[](https://github.com/LiosK/reseeding_rng-rs/blob/main/LICENSE)
`ReseedingRng` that periodically reseeds the underlying pseudorandom number
generator.
```rust
use rand::{RngExt as _, rngs::StdRng, rngs::SysRng};
use reseeding_rng::ReseedingRng;
let mut rng = ReseedingRng::<StdRng, _>::try_new(1024 * 64, SysRng)
.expect("couldn't initialize ReseedingRng due to SysRng failure");
println!("{:?}", rng.random::<[char; 4]>());
```
This crate provides a simplified reimplementation of `ReseedingRng` for use with
the random number generators from the `rand` crate v0.10, which no longer
includes [the `ReseedingRng` from v0.9] and earlier.
This crate is `no_std`-compatible unless the `std_rng` feature is enabled.
## Cargo features
- `std_rng` (optional) enables `StdReseedingRng`, a newtype wrapping
`ReseedingRng<StdRng, SysRng>` with a default reseeding threshold of 64KiB.
[the `ReseedingRng` from v0.9]: https://docs.rs/rand/0.9.4/rand/rngs/struct.ReseedingRng.html
## License
Licensed under the Apache License, Version 2.0.