You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The generated variant for nu7hatch uuids does not seem to be compliant with the RFC 4122 spec; this results in all nu7hatch uuids failing any RFC4122-based compliance/validation checks.
4.1.1. Variant
...
Msb0 Msb1 Msb2 Description
...
1 0 x The variant specified in this document.
...
Note though that the variant of nu7hatch uuids has these MSB bits set to 01, rather than 10; example code:
package main
import (
"fmt"
"github.com/nu7hatch/gouuid"
)
func main() {
// create a new v4 uuid
v4UUID, err := uuid.NewV4()
if err != nil {
panic(err.Error())
}
// RFC4122 states the variant format should be MSB0==1 and MSB1==0;
// https://tools.ietf.org/html/rfc4122#section-4.1.1
fmt.Printf("%08b\n", v4UUID.Variant())
}
Output:
01000000
The text was updated successfully, but these errors were encountered:
The generated variant for nu7hatch uuids does not seem to be compliant with the RFC 4122 spec; this results in all nu7hatch uuids failing any RFC4122-based compliance/validation checks.
Quoting the spec (from https://tools.ietf.org/html/rfc4122#section-4.1.1)
Note though that the variant of nu7hatch uuids has these MSB bits set to 01, rather than 10; example code:
Output:
01000000
The text was updated successfully, but these errors were encountered: