an erlang UUID4 library, MIT licensed.
MyBinaryUUID = uuid4:uuid4().
- There are several other erlang uuid libraries, but this one is explicitly MIT licensed, and only implements uuid4 (the 'random number' version).
- RFC 4122 is one weird document. Pour one out for Apollo Domain/OS!
- This library takes about 19 nanoseconds to create each UUID on your standard 2014 laptop. Should be plenty fast enough for most needs.
- crypto:get_bytes() is used instead of crypto:strong_get_bytes(), because (a) who cares and (b) crypto:strong_get_bytes() can throw an exception if the entropy pool is not big enough or has been depleted. Not that that is super likely to happen, but I don't have a need to debug that if it ever does.