Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a failing test for custom alphabet and long salt #183

Conversation

cacharrin
Copy link

@cacharrin cacharrin commented Jul 11, 2022

PR to demostrate an error with different salt generating the same code.

It generates the same code, no matter how many 'a' you append to the salt of the last hashids instance.

Expected behavior: codes should be different (every salt should generate a different code)
Note: Using short salt always generate different codes.

…the same code, no matter how many 'a' you append to the salt of the last hashids instance)
@vinkla
Copy link
Owner

vinkla commented Jul 13, 2022

It seems the test fails, I suggest use forums for questions. If you find a bug, please submit a new pull request.

@cacharrin
Copy link
Author

cacharrin commented Jul 13, 2022

Yes, the test failed because you asked me to add a failing test...

the test should pass, but is failing because codes generated by hashids are equal when using differente salts

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

Successfully merging this pull request may close these issues.

2 participants