打印
[超级CRC计算器]

CRC32L_1EDC6F41_FFFFFFFF_FFFFFFFF源码(www.hotcrc.com自动生成)

[复制链接]
223|0
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
CRC, dc, rc
本帖最后由 hotpower 于 2023-9-21 10:24 编辑
/*------------------------------------------------------------------------------
   本C语言核心代码由菜农HotPower@163.com的超级CRC计算器自动生成
   Copyright 1996-2022 HotPower Software, Inc.
   菜农HotPower[url=home.php?mod=space&uid=516618]@163.com[/url] 2023年9月21日 10:23:40 于西安雁塔菜地
------------------------------------------------------------------------------*/
//CRC单表大表表格:
const unsigned long CRC32L_1EDC6F41_Table[256] = {//特别注意Keil C51请用code替换const
  0x00000000L,0x1EDC6F41L,0x3DB8DE82L,0x2364B1C3L,0x7B71BD04L,0x65ADD245L,0x46C96386L,0x58150CC7L,
  0xF6E37A08L,0xE83F1549L,0xCB5BA48AL,0xD587CBCBL,0x8D92C70CL,0x934EA84DL,0xB02A198EL,0xAEF676CFL,
  0xF31A9B51L,0xEDC6F410L,0xCEA245D3L,0xD07E2A92L,0x886B2655L,0x96B74914L,0xB5D3F8D7L,0xAB0F9796L,
  0x05F9E159L,0x1B258E18L,0x38413FDBL,0x269D509AL,0x7E885C5DL,0x6054331CL,0x433082DFL,0x5DECED9EL,
  0xF8E959E3L,0xE63536A2L,0xC5518761L,0xDB8DE820L,0x8398E4E7L,0x9D448BA6L,0xBE203A65L,0xA0FC5524L,
  0x0E0A23EBL,0x10D64CAAL,0x33B2FD69L,0x2D6E9228L,0x757B9EEFL,0x6BA7F1AEL,0x48C3406DL,0x561F2F2CL,
  0x0BF3C2B2L,0x152FADF3L,0x364B1C30L,0x28977371L,0x70827FB6L,0x6E5E10F7L,0x4D3AA134L,0x53E6CE75L,
  0xFD10B8BAL,0xE3CCD7FBL,0xC0A86638L,0xDE740979L,0x866105BEL,0x98BD6AFFL,0xBBD9DB3CL,0xA505B47DL,
  0xEF0EDC87L,0xF1D2B3C6L,0xD2B60205L,0xCC6A6D44L,0x947F6183L,0x8AA30EC2L,0xA9C7BF01L,0xB71BD040L,
  0x19EDA68FL,0x0731C9CEL,0x2455780DL,0x3A89174CL,0x629C1B8BL,0x7C4074CAL,0x5F24C509L,0x41F8AA48L,
  0x1C1447D6L,0x02C82897L,0x21AC9954L,0x3F70F615L,0x6765FAD2L,0x79B99593L,0x5ADD2450L,0x44014B11L,
  0xEAF73DDEL,0xF42B529FL,0xD74FE35CL,0xC9938C1DL,0x918680DAL,0x8F5AEF9BL,0xAC3E5E58L,0xB2E23119L,
  0x17E78564L,0x093BEA25L,0x2A5F5BE6L,0x348334A7L,0x6C963860L,0x724A5721L,0x512EE6E2L,0x4FF289A3L,
  0xE104FF6CL,0xFFD8902DL,0xDCBC21EEL,0xC2604EAFL,0x9A754268L,0x84A92D29L,0xA7CD9CEAL,0xB911F3ABL,
  0xE4FD1E35L,0xFA217174L,0xD945C0B7L,0xC799AFF6L,0x9F8CA331L,0x8150CC70L,0xA2347DB3L,0xBCE812F2L,
  0x121E643DL,0x0CC20B7CL,0x2FA6BABFL,0x317AD5FEL,0x696FD939L,0x77B3B678L,0x54D707BBL,0x4A0B68FAL,
  0xC0C1D64FL,0xDE1DB90EL,0xFD7908CDL,0xE3A5678CL,0xBBB06B4BL,0xA56C040AL,0x8608B5C9L,0x98D4DA88L,
  0x3622AC47L,0x28FEC306L,0x0B9A72C5L,0x15461D84L,0x4D531143L,0x538F7E02L,0x70EBCFC1L,0x6E37A080L,
  0x33DB4D1EL,0x2D07225FL,0x0E63939CL,0x10BFFCDDL,0x48AAF01AL,0x56769F5BL,0x75122E98L,0x6BCE41D9L,
  0xC5383716L,0xDBE45857L,0xF880E994L,0xE65C86D5L,0xBE498A12L,0xA095E553L,0x83F15490L,0x9D2D3BD1L,
  0x38288FACL,0x26F4E0EDL,0x0590512EL,0x1B4C3E6FL,0x435932A8L,0x5D855DE9L,0x7EE1EC2AL,0x603D836BL,
  0xCECBF5A4L,0xD0179AE5L,0xF3732B26L,0xEDAF4467L,0xB5BA48A0L,0xAB6627E1L,0x88029622L,0x96DEF963L,
  0xCB3214FDL,0xD5EE7BBCL,0xF68ACA7FL,0xE856A53EL,0xB043A9F9L,0xAE9FC6B8L,0x8DFB777BL,0x9327183AL,
  0x3DD16EF5L,0x230D01B4L,0x0069B077L,0x1EB5DF36L,0x46A0D3F1L,0x587CBCB0L,0x7B180D73L,0x65C46232L,
  0x2FCF0AC8L,0x31136589L,0x1277D44AL,0x0CABBB0BL,0x54BEB7CCL,0x4A62D88DL,0x6906694EL,0x77DA060FL,
  0xD92C70C0L,0xC7F01F81L,0xE494AE42L,0xFA48C103L,0xA25DCDC4L,0xBC81A285L,0x9FE51346L,0x81397C07L,
  0xDCD59199L,0xC209FED8L,0xE16D4F1BL,0xFFB1205AL,0xA7A42C9DL,0xB97843DCL,0x9A1CF21FL,0x84C09D5EL,
  0x2A36EB91L,0x34EA84D0L,0x178E3513L,0x09525A52L,0x51475695L,0x4F9B39D4L,0x6CFF8817L,0x7223E756L,
  0xD726532BL,0xC9FA3C6AL,0xEA9E8DA9L,0xF442E2E8L,0xAC57EE2FL,0xB28B816EL,0x91EF30ADL,0x8F335FECL,
  0x21C52923L,0x3F194662L,0x1C7DF7A1L,0x02A198E0L,0x5AB49427L,0x4468FB66L,0x670C4AA5L,0x79D025E4L,
  0x243CC87AL,0x3AE0A73BL,0x198416F8L,0x075879B9L,0x5F4D757EL,0x41911A3FL,0x62F5ABFCL,0x7C29C4BDL,
  0xD2DFB272L,0xCC03DD33L,0xEF676CF0L,0xF1BB03B1L,0xA9AE0F76L,0xB7726037L,0x9416D1F4L,0x8ACABEB5L
};
//CRC单表大表查表算法:
unsigned long GetCRC32L_1EDC6F41_FFFFFFFF_FFFFFFFF_Table(unsigned char *crcBuff, unsigned int crcLen) {
unsigned int i;
unsigned long crc = 0xFFFFFFFF;//初值
  for(i = 0; i < crcLen; i ++){
    crc = (crc << 8) ^ CRC32L_1EDC6F41_Table[(crc >> 24) ^ crcBuff[i]];
    crc &= 0xFFFFFFFFL;//请注意此语句为了防止数据溢出,有时可删除,具体看编译环境!
  }
  crc ^= 0xFFFFFFFF;//出值
  return crc;
}
int main(){
//数据格式:HEX
const unsigned char dataTable[] = {
  0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF
};//特别注意Keil C51请用code替换const
unsigned long crc;
  crc = GetCRC32L_1EDC6F41_FFFFFFFF_FFFFFFFF_Table((unsigned char *)dataTable, sizeof(dataTable));
//表格函数返回crc=0xEBE536D3,与HotWC3运算相同
  while(crc | 1);//死循环,请在此处设置断点,验证函数返回值crc是否正确!!!
  return 0;
}


使用特权

评论回复

相关帖子

发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

个人签名:[url=http://www.21ic.com/tools/HotWC3_V1.23.html]

1460

主题

21619

帖子

506

粉丝