Package rng is a compact, fast, sponge-based,
lockless and hard-to-predict random number generator. See Green tick > QA / Tests > Details for
some statistical tests and benchmarks. It is compared with standard library's
math/rand and math/rand/v2 below:
| Library | Effective entropy in bits | Used memory in bytes |
|---|---|---|
| rng | 128 | 24 |
| std | 31 | 4920 |
| v2.PCG | 64 | 32 |
| v2.ChaCha | 256 | 336 |
rng API adheres to semantic versioning.
rng is not suitable for cryptographic applications because uses 128 bits capacity.
See Contributing, Security and Support guides. Also if you use rng and like it, please support via Github Sponsors or:
- BTC:
bc1qr8m7n0w3xes6ckmau02s47a23e84umujej822e - ETH:
0x3a844321042D8f7c5BB2f7AB17e20273CA6277f6