def tab_gash(key): hash = 0 # i = 0 for c in key: c_int = ord(c) hash_partial = hmap[(c_int + hash) & 0xFF] ^ c_int hash ^= hash_partial # print(f"{c} : {hash_partial} : {hash}") # i+= hmap[i & 0xFF] return hash