Generates random tokens that look like type 4 UUIDs: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
In contrast to RFC 4122, it uses all digits (128bit)
Source of randomness: :crypto.strong_rand_bytes
Add to mix.exs
:
defp deps do
[{:yyid, "~> 0.1"}]
end
Then run in your shell:
$ mix deps.get
YYID.new # => "e1d87f6e-fbd5-6801-9528-a1d568c1fd02"
- YYID for Ruby
- YYID for JavaScript
- YYID for Go