3 ms·
AFAIU the blog author is taking the correctly randomly generated UUID and just cutting out the timestamp portion. Why are you equating that to a hacky attempt
by yunohn 2y ago
AFAIU the blog author is taking the correctly randomly generated UUID and just cutting out the timestamp portion.
Why are you equating that to a hacky attempt to make less random data more random?
- hinkley 2y agoBecause it’s essentially setSeed(getTimeMillis()). V6 and v7 are sortable, that’s why they exist. Which means like getTimeMillis() there are a finite number of starting points to try to guess the seed.
- yunohn 2y agoThis is v4.
- hinkley 2y agov6 is a transform of v1 UUIDs to behave like v7 keys with respect to database indexing - increasing over time. If it’s a function of time, then it’s still guessable by brute force. Another responder suggested that the mention of v6 UUIDs is an error. Maybe. But that’s a truly bizarre typo to make. And they still haven’t fixed it.
- yunohn 2y agoBut you could google Postgres UUID and confirm that they only provide v4? Instead of continuing a rant based on incorrect assumptions. https://www.postgresql.org/docs/current/functions-uuid.html https://www.postgresql.org/docs/current/functions-uuid.html