Re: How to create an UUID (Version 1)
- Posted by jmduro Sep 29, 2018
- 3853 views
petelomax said...
ghaberek said...
unless there are any objections.
I am not an expert on these things but off the top of my head:
Windows: fine
Linux: datetime+mac = fine, purely random = not really, needs an option
Personally, I think that "new()" sucks, what is wrong with "new_guid()"??
It should, imo, be new_guid(bool bAllowRand=false) and return (say) {} when uuid_generate=-1 and bAllowRand is false.
Pete
First and second version conform to RFC4122 and do not make use of randomization, so uniqueness is guaranteed as far as possible.
Jean-Marc