»
Mid-square: The hash squares the value in question, uses some number of
digits from the center of the resulting number, and discards the rest of those
digits. For example, consider the value 120. When squared, you get 14,400.
The hash could use 440 to generate the hash value and discard the 1 from the
left and the 0 from the right.
Obviously, there are as many ways to generate the hash as someone has imagina-
tion to create them. Unfortunately, no amount of creativity is going to solve every
collision problem, and collisions are still likely to occur. Therefore, you need
another plan. When a collision does occur, you can use one of the following meth-
ods to address it:
Do'stlaringiz bilan baham: |