danakt / uuid-by-string

Generates the RFC-4122 Name-Based UUID
MIT License
66 stars 12 forks source link

Incorrect UUID generated - RFC 4122 #7

Closed ravi8x closed 4 years ago

ravi8x commented 5 years ago

Hello

I am trying to generate the UUID from a string. I have done the same in Android and Python. On both the platforms the same UUID is generated, but in this library the generated one different (Only the partial part is different).

The outputs:

Android: 12f01aa4-5090-3f83-b823-7e7cb43246e7

Python3: 12f01aa4-5090-3f83-b823-7e7cb43246e7

Nodejs (This library): 12f01aa4-5090-1f83-b823-7e7cb43246e7

As you can see, the third segment (3f83 != 1f83) is different in generated value. Please let me know if this is an issue in the library.

Code used: getUuid("9239107d-259f-4cf8-b62d-0964b680ab08", 3)

danakt commented 4 years ago

Thank you! Fixed