- Generates a random string in UUID#4 format:
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
- In contrast to RFC 4122, it uses all digits (128bit)
- Uses a crytographically solid source of randomness: SecureRandom
Install
$ gem install yyid
Usage
require 'yyid'
YYID.new #=> "9a4161c6-7742-b6ea-301a-d1e5e1df151d"
Other Versions
YYID is available for more languages, such as JavaScript, Elixir, or Rust.