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

Specifying custom hash alphabet #36

Closed
Edijae opened this issue Jan 9, 2017 · 3 comments
Closed

Specifying custom hash alphabet #36

Edijae opened this issue Jan 9, 2017 · 3 comments
Assignees

Comments

@Edijae
Copy link

Edijae commented Jan 9, 2017

I have extracted the below extract from your main page

Here we set the alphabet to consist of only four letters: "0123456789abcdef"
Hashids hashids = new Hashids("this is my salt", 0, "0123456789abcdef"); String hash = hashids.encode(1234567L);

hash is now going to be:
b332db5

the alphabet consists of 6 letters! a,b,c,d,e,f

@fanweixiao
Copy link
Member

any problem? the algorithm designed as you only need [0-9] and [a-f] chars?

@0x3333
Copy link
Collaborator

0x3333 commented Jan 10, 2017

@fanweixiao what @gikarasojo is trying to say is that we state that:
only four letters, but actually we have six.

0x3333 added a commit that referenced this issue Jan 10, 2017
@0x3333 0x3333 self-assigned this Jan 10, 2017
@0x3333 0x3333 closed this as completed Jan 10, 2017
@fanweixiao
Copy link
Member

@0x3333 @gikarasojo Oh, I see! yep, should be six, haha

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

3 participants