Skip to content
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

Fixed variants to be spec compliant #5

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Fixed variants to be spec compliant #5

wants to merge 2 commits into from

Conversation

beatgammit
Copy link

This fixes the code to be spec-compliant. Specifically:

  • reserved NCS variant must have bit 7 cleared
  • reserved RFC 4122 must have bit 7 set and bit 6 cleared
  • reserved microsoft must have bits 6 and 7 set and bit 6 cleared

The code happened to be doing exactly the opposite. There might be a more elegant way of doing this though.

http://www.ietf.org/rfc/rfc4122.txt

This fixes the code to be spec-compliant. Specifically:

* reserved NCS variant must have bit 7 cleared
* reserved RFC 4122 must have bit 7 set and bit 6 cleared
* reserved microsoft must have bits 6 and 7 set and bit 6 cleared

The code happened to be doing exactly the opposite. There might be a more elegant way of doing this though.

http://www.ietf.org/rfc/rfc4122.txt
@jaytaylor
Copy link

Hi,

If you're still interested in this, I've merged this PR[1], [2] into the well-maintained fork at https://github.com/jaytaylor/uuid

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants