Expand description
A universal seeder based on SipHash.
This crate is designed for use with the rand crates, allowing any RNG
supporting SeedableRng
to be seeded from any hashable value.
Seeding is designed to be fast, robust, flexible and portable. This library is intended for use in simulations and games, allowing e.g. any keyword to reproduce a simulation or procedurally generated world.
This library is not intended for cryptographic applications, and definitely not for password hashing.
§Example
use rand_seeder::rand_core::RngCore;
use rand_seeder::SipRng; // or any RNG supporting SeedableRng
use rand_seeder::Seeder;
let mut rng: SipRng = Seeder::from("stripy zebra").into_rng();
println!("A deterministic pseudo-random value: {}", rng.next_u32());
Re-exports§
pub extern crate rand_core;