4 ms·
As you say, you need to set certain bits to special values to encode a v4 UUID, leaving less than 128 bits for the payload, which means a random 128 bit number
by sltkr 6y ago
As you say, you need to set certain bits to special values to encode a v4 UUID, leaving less than 128 bits for the payload, which means a random 128 bit number is not a valid UUID except by chance.
Second, a v4 UUID should set all remaining bits randomly. Encoding a timestamp in some of the bits is not random. Sure, you could argue these could have been randomly generated by chance, so any such UUID is not invalid, strictly speaking. Still, a collection of these v4 UUIDs don't have the properties that you would expect of random UUIDs.
As specificed, the scheme satisfies neither of these two requirements.
- withinboredom 6y agoThere’s always the expired v6 proposal: https://datatracker.ietf.org/doc/draft-peabody-dispatch-new-uuid-format/ https://datatracker.ietf.org/doc/draft-peabody-dispatch-new-...
- Already__Taken 6y agobit perplexed why this never went anywhere. Seems like a solid win all around really given where uuids show up.