speps / go-hashids

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

min length #37

Closed omar-haris closed 7 years ago

omar-haris commented 7 years ago

what is min length can i use to have unique ids ?

speps commented 7 years ago

You can't use that library to generate a unique ID. You might prefer https://github.com/rs/xid for this use case.

hashids are for encoding a number/numbers into a user facing string (e.g a URL).

omar-haris commented 7 years ago

hi @speps

yes i know , i already have unique integer id using this id i generate hashed string .

my q is what is min length ?

speps commented 7 years ago

That's how long you want the resulting string to be. It will use more anyway if needed to encore more numbers or bigger numbers. You can leave at the default value and you should be okay.