1 Star 0 Fork 1

甘地/CRC_Compute

forked from liyuanbhu/CRC_Compute 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
main.cpp 497 Bytes
一键复制 编辑 原始数据 按行查看 历史
#include <iostream>
#include <stdio.h>
#include "crcCompute.h"
using namespace std;
int main(int argc, char *argv[])
{
CRC16 crc16(CRC16::eCCITT_FALSE);
char data1[] = {'1', '2', '3', '4', '5', '6', '7', '8', '9'};
char data2[] = {'5', '6', '7', '8', '9'};
unsigned short c1, c2;
c1 = crc16.crcCompute(data1, 9);
c2 = crc16.crcCompute(data1, 4, true);
c2 = crc16.crcCompute(data2, 5, false);
printf("%04x\n", c1);
printf("%04x\n", c2);
return 0;
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ceotime/CRC_Compute.git
git@gitee.com:ceotime/CRC_Compute.git
ceotime
CRC_Compute
CRC_Compute
master

搜索帮助