xie123456789
¼‰„e: ¼Òˆ@³£¿Í
¾«ÈAÖ÷î}: 0
°l(f¨¡)Ìû”µ(sh¨´)Á¿: 96 ‚€
¹¤¿ØÍþÍû: 812 üc
ÏÂÝd·e·Ö: 14486 ·Ö
ÔÚ¾€•rég: 268(С•r)
×¢ƒÔ•rég: 2020-04-13
×îºóµÇä›: 2024-10-31
²é¿´xie123456789µÄ Ö÷î} / »ØÙN
˜ÇÖ÷  °l(f¨¡)±íÓÚ: 2021-04-12 16:43
ˆDƬ£º
ÈçˆDÔõô°ÑcrcºÍУòž¸Ä³ÉÈýÁâfx5uÌÝÐΈDÓ‹Ëã
ÒÑÖª 02 07 21 15 µÄºÍУòžÖµžé 1F BB
[ ´ËÌû±»xie123456789ÔÚ2021-04-12 17:11ÖØоŽÝ‹ ]
xiongmao1212
ӛסÄãµÄ˜Ó×Ó£¬ÔÚÐÄÀïÓÀ´æ£¡
¼‰„e: ̽Ë÷½âÃÜ
¾«ÈAÖ÷î}: 0
°l(f¨¡)Ìû”µ(sh¨´)Á¿: 43 ‚€
¹¤¿ØÍþÍû: 123 üc
ÏÂÝd·e·Ö: 1609 ·Ö
ÔÚ¾€•rég: 50(С•r)
×¢ƒÔ•rég: 2015-03-01
×îºóµÇä›: 2024-06-09
²é¿´xiongmao1212µÄ Ö÷î} / »ØÙN
1˜Ç  °l(f¨¡)±íÓÚ: 2021-04-12 16:47
  public static byte[] CRC16(byte[] data)
        {
            int len = data.Length;

            if (len > 0)
            {
                ushort crc = 0xFFFF;

                for (int i = 0; i < len; i++)
                {
                    crc = (ushort)(crc ^ (data));
                    for (int j = 0; j < 8; j++)
                    {
                        crc = (crc & 1) != 0 ? (ushort)((crc >> 1) ^ 0xA001) : (ushort)(crc >> 1);
                    }
                }
                byte hi = (byte)((crc & 0xFF00) >> 8);  //¸ßλÖÃ
                byte lo = (byte)(crc & 0x00FF);         //µÍλÖÃ

                return new byte[] { hi, lo };
            }
            return new byte[] { 0, 0 };
        }
˜ÇÖ÷ÁôÑÔ£º
ÕæÕ\¸ÐÖx£¡
ÎÒÐèÒªÈýÁâÌÝÐΈD£¬ß@‚€²»ºÃ•þÓÃ