You can always create a custom hash that guarantees uniqueness. For data in a known domain (for example, SSN), the exercise is relatively simple.
If your target hash value actually has more bits available than what you haveh, the hash simply maps the input values ββto one of the available output values. This will be a simple linear mapping from the input value as a multibyte integer to output as a multibyte integer.
If the target hash value has fewer bits than what hashed, then uniqueness cannot be guaranteed.
S. Lott
source share