You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tony Arcieri edited this page May 6, 2016
·
3 revisions
Cryptography often depends on your ability to create secure numbers, but doing that correctly is surprisingly hard! RbNaCl tries to get that right for you, by using /dev/urandom on Unix-based operating systems and CryptGenRandom on Windows.
Example
# random stringsRbNaCl::Random.random_bytes(32)#=> 32 bytes of randomness, from the OS