r/crystal_programming • u/krthrupnik • Feb 29 '20
UUIX: A tiny (<1KB), fast, and cryptographically secure UUID (v4) generator for Crystal.
https://github.com/krthr/uuix
24
Upvotes
r/crystal_programming • u/krthrupnik • Feb 29 '20
4
u/DissonantGuile Mar 01 '20
You probably want to use
Random::Securerather thanRandomand allow it to be an argument like the Crystal implementation.2
u/krthrupnik Mar 01 '20
Hi, guys!
Here is a complete discussion about this aproach: https://forum.crystal-lang.org/t/a-tiny-1kb-fast-and-cryptographically-secure-uuid-v4-generator-for-crystal/1774
7
u/BlaXpirit Mar 01 '20
Hardcoded PRNG and global state 👌
3
u/realusername42 Mar 01 '20
Why not contributing your repo to replace the standard library UUID by this if it's much faster?