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

bug can't use long.max #33

Open
stjava opened this issue Oct 30, 2020 · 1 comment
Open

bug can't use long.max #33

stjava opened this issue Oct 30, 2020 · 1 comment

Comments

@stjava
Copy link

stjava commented Oct 30, 2020

can not use Long.MAX_VALUE

Hashids hashids = new Hashids();
String encode = hashids.encode(Long.MAX_VALUE);
System.out.println(encode);

@arcticicestudio
Copy link
Owner

Hi @stjava 👋, thanks for your contribution 👍

Have you made sure to enable the additional feature that disable the maximum number size limit? Otherwise this library ensures the interoperability with the algorithm reference implementation which won't allow the usage of Java's Long.MAX_VALUE because of the way JavaScript handles number values.

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

No branches or pull requests

2 participants