gouuid icon indicating copy to clipboard operation
gouuid copied to clipboard

Fixed variants to be spec compliant

Open beatgammit opened this issue 12 years ago • 1 comments

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

beatgammit avatar May 30 '13 00:05 beatgammit

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

jaytaylor avatar Jun 02 '15 19:06 jaytaylor