msws

Crates.iomsws
lib.rsmsws
version0.2.0
sourcesrc
created_at2019-06-25 08:48:40.044718
updated_at2019-09-08 04:04:22.607958
descriptionMiddle Square Weyl Sequence pseudorandom number generator.
homepage
repositoryhttps://github.com/twe4ked/msws
max_upload_size
id143417
size6,585
Odin Dutton (twe4ked)

documentation

README

Middle Square Weyl Sequence

Middle Square Weyl Sequence pseudorandom number generator (no_std).

Example

use msws::Rand;

// This will always return the same seed.
msws::seed(0); // => 0xb5ad4eceda1ce2a9

let seed = 0xb5ad4eceda1ce2a9;
let mut r = Rand::new(seed).expect("invalid seed");
r.rand(); // => 0xb5ad4ece

Crypto

Pseudorandom number generators should not be used for crypto.

License

MIT

Commit count: 11

cargo fmt