GeneralHashFunctions_2.py 173 B

12345
  1. def js_hash(key):
  2. hash_value = 1315423911
  3. for i in range(len(key)):
  4. hash_value ^= ((hash_value << 5) + ord(key[i]) + (hash_value >> 2))
  5. return hash_value