xorSum
xorSum(
data):number
Defined in: checksum/xor-sum.ts:13
Computes the plain XOR checksum of data — the running XOR of every byte.
Detects any single-bit error but nothing that flips an even number of bits in the same column across the message; used where the cost of anything more cannot be justified (NMEA 0183, Intel HEX, Modbus ASCII).
Complexity: O(n) in the byte length of data.
Parameters
Section titled “Parameters”Uint8Array
The bytes to check.
Returns
Section titled “Returns”number
An unsigned 8-bit checksum.