/************************************************************************Filename:**Description:AsimpletestprogramfortheCRCimplementations.**Notes:TotestadifferentCRCstandard,.***Copyright(c)*,this*noticemustnotbechangedorremovedandnowarrantyiseither*expressedorimpliedbyitspublicationordistribution.**********************************************************************/#include<>#include<>#include""voidmain(void){unsignedchartest[]="123456789";/**PrintthecheckvaluefortheselectedCRCalgorithm.*/printf("Thecheckvalueforthe%sstandardis0x%X\n",CRC_NAME,CHECK_VALUE);/**ComputetheCRCofthetestmessage,slowly.*/*/printf("ThecrcSlow()of\"123456789\"is0x%X\n",crcSlow(test,strlen(test)));/**ComputetheCRCofthetestmessage,moreefficiently.*/crcInit();printf("ThecrcFast()of\"123456789\"is0x%X\n",crcFast(test,strlen(test)));}/*main()*//************************************************************************Filename:**Description:AheaderfiledescribingthevariousCRCstandards.**Notes:***Copyright(c)*,this*noticemustnotbechangedorremovedandnowarrantyiseither*expressedorimpliedbyitspublicationordistribution.**********************************************************************/#ifndef
CRC循环校验的具体算法 来自淘豆网m.daumloan.com转载请标明出处.