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) "a4176ccc-e942-414e-bec2-c52f07fd23fc"
> (uuid-generate) "d61c39b1-1e42-413a-9b49-d280aa13e46d"
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) "f1cc8fb2-271b-4d66-9625-0de96f234557"
> (uuid-generate/random) "32620239-7571-4fa6-b248-ba75085e81fe"
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) "efb73226-14b2-11f1-a19d-45c64d21604b"
> (uuid-generate/time) "efb73bf4-14b2-11f1-a19d-45c64d21604b"