I looking for a way to generate a short, unique, immutable and reversible ID from an original string. I found the perfect library Hashids for that but it only wants integer in input, and I also have letters.
I don't want to use common encryption algorithms because the output is very long.
I can achieve that with base64_encode
but I want to hash with a passphrase to prevent direct decoding from unwanted people.
Anyone know a solution?
I don't think you found the "perfect library" for your needs. From the website;