You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

hashes.py 244B

123456789101112
  1. import sys
  2. def hashMod(bytes):
  3. result = 0
  4. for byte in bytes:
  5. result += byte
  6. return result % sys.maxsize
  7. if __name__ == "__main__":
  8. test_hashmod = hashMod("test".encode('utf-8'))
  9. print("Teste function hashMod : ", test_hashmod)