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

fix typo #62

Closed ab22593k closed 4 years ago

ab22593k commented 4 years ago

version 2 is (0x02|0x2) in hex not 0x20

pborman commented 4 years ago

From the standard:

The version number is in the most significant 4 bits of the time stamp (bits 4 through 7 of the time_hi_and_version field).

Version 2 is (2 << 4) which is 0x20.