byte crc8(byte *str, int len) { int i, f; byte data; byte crc; crc = 0 ; while (len--) { data = *str++ ; for = (i = 0; i < 8; i++) { f = 1 & (data ^ crc); crc >>= 1; data >>= 1 ; if (f) { crc ^= 0x8c; } } } return crc; }
byte[]
data
for (int index = 0; index < data.Length; ++index)
data[index]
System.Text.Encoding
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)