oculus42 / short-uuid

Translate standard UUIDs into shorter formats and back.
MIT License
450 stars 13 forks source link

How likely the translator.new() will generate the same uuid? #43

Closed kempsteven closed 4 years ago

kempsteven commented 4 years ago

Was wondering how likely will the translator.new() will generate same uuid? how safe is it using in a hundreds or thousands of item? if you have tested, in what percentage does it generate the same uuid? since its shortened, it will probably be less safe than the rfc compliant uuids.

oculus42 commented 4 years ago

The value is shorter as a string because we use a larger alphabet than the hexadecimal of a UUID. Each generated value starts out as a standard RFC4122 v4-compliant UUID, using the uuid library, and can be translated back into the original UUID If desired.

There is no difference from the original UUID generation; short-uuid just translates to other alphabets.

As the README says:

short-uuid starts with RFC4122 v4-compliant UUIDs and translates them into other, usually shorter formats.

kempsteven commented 4 years ago

Alright got it thanks!