speps / go-hashids

Go (golang) implementation of http://www.hashids.org
MIT License
1.32k stars 109 forks source link

Please support big int #50

Closed Pengfei00 closed 2 years ago

Pengfei00 commented 6 years ago

thx

bbq-oba commented 5 years ago

uint64 please

dolmen commented 4 years ago

HashIDs support only arrays of int64. That's how they are designed. And cross-language compatibility of HashIDs is a major feature.

But you can still encode big int or uint64 as an array of int64 on top of this library.

msztolcman commented 2 years ago

Hello, I've added support for BigInt on my own, however @dolmen's comment about cross-lang compatibility stops me from PR here. If anyone is interested, then my solutions is on https://github.com/msztolcman/go-hashids - comments are welcome, I'm not fluent in GoLang :) Maybe it's not best implementation and bad vars naming in few places, but I will fix this later.

Most important part for me was to have allowed "translation" from UUID to hashid. It works well in PHP, and Go version also was required.