prakt2
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
import sys
|
||||
|
||||
def hashMod(bytes):
|
||||
result = 0
|
||||
for byte in bytes:
|
||||
result += byte
|
||||
return result % sys.maxsize
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
test_hashmod = hashMod("test".encode('utf-8'))
|
||||
print("Teste function hashMod : ", test_hashmod)
|
||||
Reference in New Issue
Block a user