Programming Guide

External Interfaces
75
Sample Checksum Verification Code
The following code sample is a ā€œCā€ routine to verify a checksum.
BOOL checksum_verify(char const* buffer, int nLen)
{
char sentCRC = pullHexValue(buffer+nLen-4);
char cs = compute_checksum(buffer, nLen-4);
return (cs == sentCRC);
}