rand_seeder

Build Status Latest version Documentation Minimum rustc version License

A universal seeder based on [SipHash].

This crate is designed for use with the [rand] crates, allowing any RNG supporting [rand_core::SeedableRng] to be seeded from any hashable value. It provides the following:

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:

```rust use randcore::RngCore; // for nextu32 use randpcg::Pcg64; // or whatever you like use randseeder::Seeder;

let mut rng: Pcg64 = Seeder::from("stripy zebra").makerng(); println!("First value: {}", rng.nextu32()); ```

Changelog

SipHash.

License

rand_seeder is distributed under the terms of both the MIT license and the Apache License (Version 2.0).

See LICENSE-APACHE and LICENSE-MIT for details.