hashids.github.io
hashids.github.io copied to clipboard
Limit length of hash?
Is there a way to limit the length of the hash to a certain number of character?
You would need to limit the number(s) used to generate the hash.
If you're only using 1 number to generated the hash, make a loop, and stop it once the number is more than the limit, and you have your max value.
There's no way to set the max length (only min). It's not a hash, but an id. Since they're generated by encoding numbers, sooner or later you'll overflow any length.