rand-blake3
Implementation of RngCore using BLAKE3 as a PRNG.
Example
// Hash input and convert the output stream to an rng.
let mut hasher = new;
hasher.update;
hasher.update;
hasher.update;
let mut rng: Rng = hasher.finalize_xof.into;
let output: u64 = rng.gen;
assert_eq!;
// Alternately, seed it as a rand::SeedableRng.
let mut rng = from_seed;
let output: u64 = rng.gen;
assert_eq!;
// In the real world, you will probably not use a static seed, but seed from
// OsRng or something of the sort.
let mut rng = from_rng.unwrap;
let _output: u64 = rng.gen;
// You can also use this as a backing for a rand ReseedingRng
let mut reseeding = new;
let _output: u64 = reseeding.gen;