GeneralHashFunctions_8.py 173 B

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