打印
[超级CRC计算器]

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

[复制链接]
266|0
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
AD, CRC, rc
本帖最后由 hotpower 于 2023-9-21 10:32 编辑
/*------------------------------------------------------------------------------
   本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:31:51 于西安雁塔菜地
------------------------------------------------------------------------------*/
//CRC单表大表表格:
const uint48 CRC48L_D28DB3FA4AAD_Table[256] = {//特别注意Keil C51请用code替换const
  0x000000000000L,0xD28DB3FA4AADL,0x7796D40EDFF7L,0xA51B67F4955AL,0xEF2DA81DBFEEL,0x3DA01BE7F543L,0x98BB7C136019L,0x4A36CFE92AB4L,
  0x0CD6E3C13571L,0xDE5B503B7FDCL,0x7B4037CFEA86L,0xA9CD8435A02BL,0xE3FB4BDC8A9FL,0x3176F826C032L,0x946D9FD25568L,0x46E02C281FC5L,
  0x19ADC7826AE2L,0xCB207478204FL,0x6E3B138CB515L,0xBCB6A076FFB8L,0xF6806F9FD50CL,0x240DDC659FA1L,0x8116BB910AFBL,0x539B086B4056L,
  0x157B24435F93L,0xC7F697B9153EL,0x62EDF04D8064L,0xB06043B7CAC9L,0xFA568C5EE07DL,0x28DB3FA4AAD0L,0x8DC058503F8AL,0x5F4DEBAA7527L,
  0x335B8F04D5C4L,0xE1D63CFE9F69L,0x44CD5B0A0A33L,0x9640E8F0409EL,0xDC7627196A2AL,0x0EFB94E32087L,0xABE0F317B5DDL,0x796D40EDFF70L,
  0x3F8D6CC5E0B5L,0xED00DF3FAA18L,0x481BB8CB3F42L,0x9A960B3175EFL,0xD0A0C4D85F5BL,0x022D772215F6L,0xA73610D680ACL,0x75BBA32CCA01L,
  0x2AF64886BF26L,0xF87BFB7CF58BL,0x5D609C8860D1L,0x8FED2F722A7CL,0xC5DBE09B00C8L,0x175653614A65L,0xB24D3495DF3FL,0x60C0876F9592L,
  0x2620AB478A57L,0xF4AD18BDC0FAL,0x51B67F4955A0L,0x833BCCB31F0DL,0xC90D035A35B9L,0x1B80B0A07F14L,0xBE9BD754EA4EL,0x6C1664AEA0E3L,
  0x66B71E09AB88L,0xB43AADF3E125L,0x1121CA07747FL,0xC3AC79FD3ED2L,0x899AB6141466L,0x5B1705EE5ECBL,0xFE0C621ACB91L,0x2C81D1E0813CL,
  0x6A61FDC89EF9L,0xB8EC4E32D454L,0x1DF729C6410EL,0xCF7A9A3C0BA3L,0x854C55D52117L,0x57C1E62F6BBAL,0xF2DA81DBFEE0L,0x20573221B44DL,
  0x7F1AD98BC16AL,0xAD976A718BC7L,0x088C0D851E9DL,0xDA01BE7F5430L,0x903771967E84L,0x42BAC26C3429L,0xE7A1A598A173L,0x352C1662EBDEL,
  0x73CC3A4AF41BL,0xA14189B0BEB6L,0x045AEE442BECL,0xD6D75DBE6141L,0x9CE192574BF5L,0x4E6C21AD0158L,0xEB7746599402L,0x39FAF5A3DEAFL,
  0x55EC910D7E4CL,0x876122F734E1L,0x227A4503A1BBL,0xF0F7F6F9EB16L,0xBAC13910C1A2L,0x684C8AEA8B0FL,0xCD57ED1E1E55L,0x1FDA5EE454F8L,
  0x593A72CC4B3DL,0x8BB7C1360190L,0x2EACA6C294CAL,0xFC211538DE67L,0xB617DAD1F4D3L,0x649A692BBE7EL,0xC1810EDF2B24L,0x130CBD256189L,
  0x4C41568F14AEL,0x9ECCE5755E03L,0x3BD78281CB59L,0xE95A317B81F4L,0xA36CFE92AB40L,0x71E14D68E1EDL,0xD4FA2A9C74B7L,0x067799663E1AL,
  0x4097B54E21DFL,0x921A06B46B72L,0x37016140FE28L,0xE58CD2BAB485L,0xAFBA1D539E31L,0x7D37AEA9D49CL,0xD82CC95D41C6L,0x0AA17AA70B6BL,
  0xCD6E3C135710L,0x1FE38FE91DBDL,0xBAF8E81D88E7L,0x68755BE7C24AL,0x2243940EE8FEL,0xF0CE27F4A253L,0x55D540003709L,0x8758F3FA7DA4L,
  0xC1B8DFD26261L,0x13356C2828CCL,0xB62E0BDCBD96L,0x64A3B826F73BL,0x2E9577CFDD8FL,0xFC18C4359722L,0x5903A3C10278L,0x8B8E103B48D5L,
  0xD4C3FB913DF2L,0x064E486B775FL,0xA3552F9FE205L,0x71D89C65A8A8L,0x3BEE538C821CL,0xE963E076C8B1L,0x4C7887825DEBL,0x9EF534781746L,
  0xD81518500883L,0x0A98ABAA422EL,0xAF83CC5ED774L,0x7D0E7FA49DD9L,0x3738B04DB76DL,0xE5B503B7FDC0L,0x40AE6443689AL,0x9223D7B92237L,
  0xFE35B31782D4L,0x2CB800EDC879L,0x89A367195D23L,0x5B2ED4E3178EL,0x11181B0A3D3AL,0xC395A8F07797L,0x668ECF04E2CDL,0xB4037CFEA860L,
  0xF2E350D6B7A5L,0x206EE32CFD08L,0x857584D86852L,0x57F8372222FFL,0x1DCEF8CB084BL,0xCF434B3142E6L,0x6A582CC5D7BCL,0xB8D59F3F9D11L,
  0xE7987495E836L,0x3515C76FA29BL,0x900EA09B37C1L,0x428313617D6CL,0x08B5DC8857D8L,0xDA386F721D75L,0x7F230886882FL,0xADAEBB7CC282L,
  0xEB4E9754DD47L,0x39C324AE97EAL,0x9CD8435A02B0L,0x4E55F0A0481DL,0x04633F4962A9L,0xD6EE8CB32804L,0x73F5EB47BD5EL,0xA17858BDF7F3L,
  0xABD9221AFC98L,0x795491E0B635L,0xDC4FF614236FL,0x0EC245EE69C2L,0x44F48A074376L,0x967939FD09DBL,0x33625E099C81L,0xE1EFEDF3D62CL,
  0xA70FC1DBC9E9L,0x758272218344L,0xD09915D5161EL,0x0214A62F5CB3L,0x482269C67607L,0x9AAFDA3C3CAAL,0x3FB4BDC8A9F0L,0xED390E32E35DL,
  0xB274E598967AL,0x60F95662DCD7L,0xC5E23196498DL,0x176F826C0320L,0x5D594D852994L,0x8FD4FE7F6339L,0x2ACF998BF663L,0xF8422A71BCCEL,
  0xBEA20659A30BL,0x6C2FB5A3E9A6L,0xC934D2577CFCL,0x1BB961AD3651L,0x518FAE441CE5L,0x83021DBE5648L,0x26197A4AC312L,0xF494C9B089BFL,
  0x9882AD1E295CL,0x4A0F1EE463F1L,0xEF147910F6ABL,0x3D99CAEABC06L,0x77AF050396B2L,0xA522B6F9DC1FL,0x0039D10D4945L,0xD2B462F703E8L,
  0x94544EDF1C2DL,0x46D9FD255680L,0xE3C29AD1C3DAL,0x314F292B8977L,0x7B79E6C2A3C3L,0xA9F45538E96EL,0x0CEF32CC7C34L,0xDE6281363699L,
  0x812F6A9C43BEL,0x53A2D9660913L,0xF6B9BE929C49L,0x24340D68D6E4L,0x6E02C281FC50L,0xBC8F717BB6FDL,0x1994168F23A7L,0xCB19A575690AL,
  0x8DF9895D76CFL,0x5F743AA73C62L,0xFA6F5D53A938L,0x28E2EEA9E395L,0x62D42140C921L,0xB05992BA838CL,0x1542F54E16D6L,0xC7CF46B45C7BL
};
//CRC单表大表查表算法:
uint48 GetCRC48L_D28DB3FA4AAD_000000000000_000000000000_Table(unsigned char *crcBuff, unsigned int crcLen) {
unsigned int i;
uint48 crc = 0x000000000000;//初值
  for(i = 0; i < crcLen; i ++){
    crc = (crc << 8) ^ CRC48L_D28DB3FA4AAD_Table[(crc >> 40) ^ crcBuff[i]];
    crc &= 0xFFFFFFFFFFFFL;//请注意此语句为了防止数据溢出,有时可删除,具体看编译环境!
  }
  return crc;
}
int main(){
//数据格式:HEX
const unsigned char dataTable[] = {
  0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF
};//特别注意Keil C51请用code替换const
uint48 crc;
  crc = GetCRC48L_D28DB3FA4AAD_000000000000_000000000000_Table((unsigned char *)dataTable, sizeof(dataTable));
//表格函数返回crc=0x0CFE3A0A507C,与HotWC3运算相同
  while(crc | 1);//死循环,请在此处设置断点,验证函数返回值crc是否正确!!!
  return 0;
}


使用特权

评论回复

相关帖子

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

本版积分规则

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

1460

主题

21619

帖子

506

粉丝