Skip to content

Instantly share code, notes, and snippets.

@outtoin
Created May 1, 2019 13:13
Show Gist options
  • Save outtoin/ea9839f5b66d615360e2f95c9ad93aad to your computer and use it in GitHub Desktop.
Save outtoin/ea9839f5b66d615360e2f95c9ad93aad to your computer and use it in GitHub Desktop.
checksum.py
def checksum(msg):
ck_a = 0
ck_b = 0
for i in msg:
ck_a = ck_a + i
ck_b = ck_b + ck_a
ck_a = ck_a % 256
ck_b = ck_b % 256
return (ck_a, ck_b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment