MCPcopy Create free account
hub / github.com/FrameworkComputer/framework-system / checksum_calc

Function checksum_calc

decode_pcapng.py:113–118  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

111 return val # return positive value as isi
112
113def checksum_calc(s):
114 sum = 0
115 for c in s:
116 sum = (sum + c) & 0xFF
117 sum = -(sum % 256)
118 return (sum & 0xFF)
119
120def write_cyacd_row(f, row_no, data):
121 # No idea what array ID is but it seems fine to keep it 0. Official builds also have that

Callers 1

write_cyacd_rowFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected