Skip to content
/ msws Public

Middle Square Weyl Sequence pseudorandom number generator.

Notifications You must be signed in to change notification settings

twe4ked/msws

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Middle Square Weyl Sequence pseudorandom number generator.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages