Hashing key to achieve consistent hashing.