C# CRC16校验码 1.0
2021-06-05 08:03
标签:数组 getc crc CRC16 int lse static etc get /// /// 计算CRC16校验码 1.0 /// /// 字节数组 /// 校验的长度 /// public static int GetCRC(byte[] bytes, int len) { int CRC = 0x0000ffff; int POLYNOMIAL = 0x0000a001; int i, j; for (i = 0; i
{ CRC ^= ((int)bytes[i] & 0x000000ff); for (j = 0; j
{ if ((CRC & 0x00000001) != 0) { CRC >>= 1; CRC ^= POLYNOMIAL; } else { CRC >>= 1; } } } return CRC; } C# CRC16校验码 1.0 标签:数组 getc crc CRC16 int lse static etc get 原文地址:https://www.cnblogs.com/z45281625/p/10818093.html
上一篇:c#语法复习总结(2)-数据类型