A universal seeder based on SipHash.
SipHasheris a portable implementation of SipHash-2-4. According to the authors, SipHash is a secure, fast and simple keyed hash function.
SipRngis a PRNG based on the
SipHashstate and mixing operations. It is statistically high-quality, passing practrand tests to at least 4 TiB.
SipRng, maintaining the full 256 bits of state. (This might break the hasher's security.)
Seederis a convenience wrapper around the above (see example).
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.
use RngCore; // for next_u32 use Pcg64; // or whatever you like use Seeder; let mut rng: Pcg64 = from.make_rng; println!;
Rust version requirements
Requires rustc 1.32 or greater for the
.to_le_bytes() method and for
rand_core 0.5 compatibility.
rand_seeder is distributed under the terms of both the MIT license and the
Apache License (Version 2.0).