-
Notifications
You must be signed in to change notification settings - Fork 156
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
Why hashids has MAX_NUMBER limitation #47
Comments
The original and reference implementation is a JS version. JS number limitation is |
Thanks for explanation. It would be nice to have ability to provide Max number as constructor argument. |
Why don't use BigInt for Javascript to resolve the number max value in Javascript instead of use a more little number for java ? |
We are just a port from JS version. |
JS version is preparing the BigInt package and will support it with V2. Why don't make the MAX_NUMBER as options instead of final value. |
This was a suprise to me as well, as the org.hashids.Hashids#encode(Long) method makes no mention of this, so on paper the interface supports any long. This seems like something that should be on the javadoc. For random numbers, |
Hello,
I was looking into this great library for my project, but I quickly found undocumented limitation that this library doesn't support any number > 9007199254740992L.
Could you please explain the reasoning behind this limitation?
ids.encode(new Random().nextLong()
The text was updated successfully, but these errors were encountered: