What is Hashids and how does it work?
masterHashids creates short, unique, decodable hashes from unsigned (long) integers. It is designed for obfuscating IDs in URLs, tracking, or making pages unguessable.
Key Features:
- Uniqueness: Hashes are unique and decodable back to the original numbers.
- Multi-integer support: Can encode multiple numbers into a single hash.
- Obfuscation: It is designed to make IDs unguessable and unpredictable (e.g., incrementing numbers do not result in obvious patterns in the hashes).
- Curse Word Avoidance: By default, the algorithm avoids generating common English curse words by restricting certain character combinations.
Note on Security: Hashids is intended for obfuscation, not for security or compression. It should not be used as a replacement for cryptographic security measures.