-
Notifications
You must be signed in to change notification settings - Fork 187
Proposal to generate UUID
s using RandomNumberGenerator
s
#1271
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: main
Are you sure you want to change the base?
Conversation
fb5c82f
to
df12e88
Compare
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.
I don't think you need two proposal files
df12e88
to
8f18f07
Compare
This PR adds a proposal to generate `UUID's` using `RandomNumberGenerator`s
8f18f07
to
d9ffe2f
Compare
var secondBits = second | ||
|
||
// Set the version to 4 (0100 in binary) | ||
firstBits &= 0xFFFFFFFFFFFF0FFF // Clear the last 12 bits |
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.
Is the code wrong or the comment wrong? This appears to clear bits 12 ... 15.
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.
The comment was wrong. This clears bits 48-51 of the UInt64 aligned with the RFC. Example below
10010100 10010010 10111010 11000100 11110011 01010011 00101001 11100111
10010100 10010010 10111010 11000100 11110011 01010011 00001001 11100111
0ef6492
to
96cc29c
Compare
This PR adds a proposal to generate
UUID's
usingRandomNumberGenerator
s