Fix EncodeHex and DecodeHex from original implementations#51
Fix EncodeHex and DecodeHex from original implementations#51mashmooli wants to merge 3 commits intospeps:masterfrom
Conversation
hashids_test.go
Outdated
| func TestEncodeDecodeHex(t *testing.T) { | ||
| hdata := NewData() | ||
| hdata.MinLength = 30 | ||
| hdata.MinLength = 8 |
There was a problem hiding this comment.
Why do you change the MinLength? What is the result if you leave it at 30? If you change the implementation, leave the unit test unchanged.
There was a problem hiding this comment.
thanks for replying. i had turn backed it to 'MinLength = 30'
and you can check it with js example in: https://codepen.io/anon/pen/arVLpG
|
What is the status of this? Is it going to be merged or not? Also, if it gets merged, how is it going to be released, seeing that it breaks backward compatibility? |
|
I propose to close this issue. |
|
why not release never version with go mod as /v2 ? |
|
Well, I think that a In addition, this "fixed" implementation of DecodeHex use a regexp, which is not efficient, so it must not be merged as is. |
Hi
in original implementation encode the hex
5a74d76ac89b05000e977baawith saltthis is my saltis equal withbv89jEY45DslgBOeD2Qg. but i tested it with this repo and it's different with original implementation.i fixed it in this PR.