Tool to calculate and add CRC codes to a string *************************************************************************** Copyright (c) 2003 Thoraxcentrum, Erasmus MC, The Netherlands. Written by Marcel de Wijs with help from a lot of others, especially Stefan Nelwan This code is for free. I ported it from several different sources to C#. For comments: [email protected] ***************************************************************************
示例#1
0
        public static short CalcCRC(byte[] packet, int length)
        {
            if (_crc == null)
            {
                _crc = new CRCTool ();
                _crc.Init (CRCTool.CRCCode.CRC_CCITT);
            }

            return (short)_crc.crctablefast (packet, length);
        }
示例#2
0
        public static short CalcCRC(byte[] packet, int length)
        {
            if (_crc == null)
            {
                _crc = new CRCTool();
                _crc.Init(CRCTool.CRCCode.CRC_CCITT);
            }

            return((short)_crc.crctablefast(packet, length));
        }