yomorun / hashids-java

Hashids algorithm v1.0.0 implementation in Java
http://hashids.org
MIT License
1.02k stars 156 forks source link

Specifying custom hash alphabet #36

Closed Edijae closed 7 years ago

Edijae commented 7 years ago

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 commented 7 years ago

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

0x3333 commented 7 years ago

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

fanweixiao commented 7 years ago

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