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) "8473b702-df1f-43d0-a465-bc041080cc71"
> (uuid-generate) "cbe3a579-78e1-43cc-a50d-95c6ee7f4ae5"
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) "8bc7695d-2b3f-4fd7-aa3d-53ebfece76e6"
> (uuid-generate/random) "dca3715c-5f0c-4ed0-8f60-0dc8456ce48e"
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) "2f822508-9651-11f1-b0ca-c7db92f4031b"
> (uuid-generate/time) "2f82418c-9651-11f1-b0ca-c7db92f4031b"