### 4 stable releases

3.1.0 | Oct 12, 2023 |
---|---|

3.0.0 | May 23, 2022 |

2.0.0 | Dec 12, 2020 |

1.0.0 | Nov 3, 2020 |

#**25** in #prng

**48** downloads per month

Used in lolid

**BSL-1.0**license

9KB

129 lines

# squares-rnd

Simple and fast counter based non-crypto random generator.

The algorithm is based on

.
See paper for details.`Middle Square Weyl Sequence RNG`

**NOTE**: Not cryptographically secure.

There are several note-worthy properties to the algorithm:

- State is represented by counter, which is incremented to produce new value, hence making it easy to predict how state would change.
- The code is short and simple, only taking minimum amount of operations to produce uniform output.

must have close to equal number of zeroes and ones for optimal output. This crate provides single key for use, to have more download key file gist`key`