google / uuid

Go package for UUIDs based on RFC 4122 and DCE 1.1: Authentication and Security Services.
BSD 3-Clause "New" or "Revised" License
5.26k stars 362 forks source link

Fixed masking the signature bits of version 4 #57

Closed reneklootwijk closed 4 years ago

reneklootwijk commented 4 years ago

The masking of the bits to add the signature of the version 4 uuid is wrong. uuid[6] & 0x0f should be uuid[6] & 0xf0 and uuid[8] & 0x3f should be uuid[8] & 0xc0