Convert C to PHP for CRC16 Function

匿名 (未验证) 提交于 2019-12-03 02:20:02

问题:

I need help in converting C code into PHP. The following is the C Code:

static const U16 crctab16[] = { 0x0000, 0x1189, ... };  U16 GetCrc16(const U8* pData, int nLength) {   U16 fcs = 0xffff;   while(nLength > 0)   {     fcs = (fcs >> 8) ^ crctab16[fcs ^ *pData) & 0xff];     nLength--; pData++;   }   return ~fcs; }

I have the fo

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!