-
Notifications
You must be signed in to change notification settings - Fork 4
Add support for RFC9562 UUID versions #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
boris-kolpackov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additionally to the inline changes, I don't see you handling the new versions when generated.
Specifically, we need to decide whether they are strong. I think v6 and v7 are expected to be strong while v8 may not be.
I suggest that you grep the source for all uses of uuid_version and see if something needs to be added for new versions.
libstud/uuid/uuid.hxx
Outdated
| md5 = 3, // Name-based with MD5 hashing. | ||
| random = 4, // Randomly or pseudo-randomly generated. | ||
| sha1 = 5, // Name-based with SHA1 hashing. | ||
| reordered_time = 6, // Sortable Time-based (RFC9562) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Sortable time-based (RFC9562).
libstud/uuid/uuid.hxx
Outdated
| random = 4, // Randomly or pseudo-randomly generated. | ||
| sha1 = 5, // Name-based with SHA1 hashing. | ||
| reordered_time = 6, // Sortable Time-based (RFC9562) | ||
| unix_time = 7, // Privacy friendly time based (RFC9562) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Unix Epoch time-based (RFC9562).
libstud/uuid/uuid.hxx
Outdated
| sha1 = 5, // Name-based with SHA1 hashing. | ||
| reordered_time = 6, // Sortable Time-based (RFC9562) | ||
| unix_time = 7, // Privacy friendly time based (RFC9562) | ||
| custom = 8, // Custom vendor specific (RFC9562) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Custom format for experimental or vendor-specific use (RFC9562).
Also, please drop the comma.
This pull request adds the new UUID version added by RFC 9562.
Added new UUID version enumerations:
time_reordered(version 6): Introduces a sortable time-based UUID formattime_unix(version 7): Provides a privacy-friendly time-based UUID generation method using unix timecustom(version 8): Reserved for vendor-specific UUID implementations