No description
Find a file
2025-06-01 17:20:25 +02:00
.github/workflows feat: Initial commit 2024-05-22 11:47:41 +02:00
src feat: 0.2.0 2025-03-20 12:07:05 +01:00
tests feat: 0.2.0 2025-03-20 12:07:05 +01:00
.gitignore feat: Initial commit 2024-05-22 11:47:41 +02:00
LICENSE feat: Initial commit 2024-05-22 11:47:41 +02:00
README.md docs: Update README 2025-06-01 17:20:25 +02:00
rng.nimble feat: 0.2.0 2025-03-20 12:07:05 +01:00

nim-rng

Credit: The uuidv4 proc is based on on nim-uuid4 by Matt Cooper (@vtbassmatt on GitHub)

Very basic wrapper over std/sysrand, you might be able to use this as a somewhat cryptographically-secure drop-in replacement for std/random

Install using nimble: nimble install rng or nimble install https://codeberg.org/onbox/rng Documentation can be found here

Warning: std/sysrand has not been audited, and so it is possible that it might not actually be cryptographically secure. But, it also just wraps over common platform-specific cryptographically-secure random number generators so the chance that this is unsafe is small but it is a real chance. Decide for yourself whether or not this is worth the risk, if it isn't then consider using wrappers to OpenSSL or some other well-established cryptography library that offers a CSPRNG.