libuuid
Jan Dvorak <mordae@anilinux.org>
Interface to the libuuid library usable to generate high-quality UUIDs.
(require libuuid) | package: libuuid |
procedure
(uuid-generate) → string?
> (uuid-generate) "72b97e29-3564-4d28-a447-5b3163e78574"
> (uuid-generate) "77a46d57-c91d-4303-8b37-f7665509a647"
procedure
Can be used to prevent any chance of host’s MAC address leaking, at the cost of slightly higher chance of generating non-unique identifiers if the worst-case situation arises on multiple hosts.
> (uuid-generate/random) "8848c2dd-0065-442d-b984-8e927e1158b5"
> (uuid-generate/random) "bbefd483-40ae-4ecc-9036-e8832cf0102d"
procedure
Could potentially produce non-uniqueue identifiers if used concurrently so if you do not absolutely need sequential identifiers, stick with the generic (and safe) uuid-generate function above.
> (uuid-generate/time) "3204fd92-c9ce-11e5-8410-080027c172e9"
> (uuid-generate/time) "3205ab0c-c9ce-11e5-8410-080027c172e9"