Skip to content
This repository has been archived by the owner on Feb 21, 2022. It is now read-only.

Clarifications about collisions and uniqueness #18

Open
hashimaziz1 opened this issue Jan 25, 2022 · 0 comments
Open

Clarifications about collisions and uniqueness #18

hashimaziz1 opened this issue Jan 25, 2022 · 0 comments

Comments

@hashimaziz1
Copy link

hashimaziz1 commented Jan 25, 2022

Firstly, thanks for a great package, I came across this from another package (I don't remember which) that was itself linked to from Hashids, so I'm hoping this turns out to be faster than both of them.

I know in another post you said something along the lines of "there are no collision rates", and I wanted to confirm whether that was limited to the context of that thread or whether it generally applies to Cryptomute hashes. Is the output guaranteed to always be free of collisions no matter what?

I'm looking to generate unique user-facing IDs using primary keys in a database as input, limited to 8 digits. I selected the aes-192-ecb cipher which doesn't have an IV, and set a range of 0, 99999999 for the length, plus padding. Can I expect this function to return none or low collisions, and would using a short password affect this? For that matter, is it a good idea to use another dynamic value in the database (such as email?) as a dynamic password, or does the password need to remain static?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant