algorithm - Checksum without logic/bitwise operations -
algorithm - Checksum without logic/bitwise operations -
i need calculate 1 byte checksum on 15 bytes. first thought utilize crc8, problem have utilize limited basic interpreter supports basic arithmetic operations (+-*/) no bitwise "xor", "and" or "or" , no "shift" operations.
so question is: possible calculate reasonable checksum these limitations? think calculating sum poor solution, can't think of else @ moment.
let = 1 allow b = 0 n = 1 15 allow = + c(n) allow b = b + next n allow b = mod(b, 251)
then utilize b
check value. advantage of on simple sum is not commutative. order of bytes matter. string of zeroes not give zero, , check value depends on how many zeros.
algorithm checksum crc basic integer-arithmetic
Comments
Post a Comment