eugenehp / react-native-uuid

UUID generation for react-native.
MIT License
256 stars 36 forks source link

Wrong uuid v5 when using namespaces #18

Open aviadch opened 1 year ago

aviadch commented 1 year ago

Using v5 in the internet: image

Using v5 with this library:

import uuid from 'react-native-uuid';

//Not a real component - just a concept
const DummyComponent = () => {
  console.log({
    actualId: uuid.v5("orderId","f87ff660-ef24-47a6-b9a8-d64545dd6a4e"),
    expectedId: "02cd8985-1b72-5e1f-a597-392fc492ca68",
  });
}

Result is:

{
    "actualId": "31306430-6633-5136-b061-636236373634",
    "expectedId": "02cd8985-1b72-5e1f-a597-392fc492ca68"
}

I have look inside the V5 code and its look like you changing the variables for some reason. Any reason why?

eugenehp commented 1 year ago

Thanks for reporting, I'll take a look. Can you share more details about your use case?

eugenehp commented 1 year ago

@aviadch which version of RN did you use and what was the device you used?