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) "6cff215e-1bd2-4602-a659-de1ef57ed78d"
> (uuid-generate) "12169bac-e73d-433a-8f04-7a63662f80dd"
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) "53d24c51-f9dc-4e99-97f2-483a9ec1834c"
> (uuid-generate/random) "4ffcbcc4-4daa-4cf0-8645-07da296e9d6b"
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) "4087c66a-7bd0-11f0-ad43-1fc229200f80"
> (uuid-generate/time) "4087df56-7bd0-11f0-ad43-1fc229200f80"