111,122
社区成员
发帖
与我相关
我的任务
分享
private static UInt32 CRC_16(byte[] Data, UInt32 Size)
{
UInt32 i;
UInt16 Value;
Value = 0;
//Data++;
for (i = 0; i < Size; i++)
Value = (ushort)((Value << 8) ^ (UInt16)CRC[(Value >> 8) ^ Data[i]]);
return Value;
}
private static UInt16 CRC_16(byte[] data, int index, int length)
{
int i;
UInt16 Value;
Value = 0;
//Data++;
for (i = index; i < index+length; i++)
Value = (ushort)((Value << 8) ^ (UInt16)CRC[(Value >> 8) ^ data[i]]);
return Value;
}