danakt/uuid-by-string

Incorrect UUID generated - RFC 4122

ravi8x opened this issue · 1 comments

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)

Thank you! Fixed