
A hash function that returns a unique hash number/string is called a universal hash function.
Thus, we say that our hash function has the following properties
- it always returns a value for an object.
- two equal objects will always have the same value
- two unequal objects may not always have different values
When we put objects into a hashtable, it is possible that different objects might have the same hashcode. This is called a collision. Here is the example of collision. Two different strings ""Aa" and "BB" have the same key:
"Aa" = 'A' * 31 + 'a' = 2112
"BB" = 'B' * 31 + 'B' = 2112
The problem I’m addressing, given 2 GUIDs, will the hash be unique? More research on my part is required, but I know the probability is extremely low – especially using a unique salt. I made sure by it was unique by adding a unique index (constraint) on the hash column in SQL Server (paranoid).
If you have any thoughts on my problem of 2 hashed GUIDS, please let me know.
Thank You for listening!