hashids.rb
hashids.rb copied to clipboard
A small Ruby gem to generate YouTube-like hashes from one or many numbers. Use hashids when you do not want to expose your database ids to the user.
The salt appears to have a maximum length after which it has no longer impacts the generated hash. Here some examples: ```ruby Hashids.new('a' * 41).encode(1) => "pn" Hashids.new('a' * 42).encode(1)...
I need to generate [hashids from Python](https://github.com/davidaurelio/hashids-python), but can't figure out what salt is used by default in the Ruby on Rails deploy. This would be an awesome detail to...