Esempio n. 1
0
        public static ushort Generate(byte[] data)
        {
            EIGen3CRC16 crc = new EIGen3CRC16();

            crc.Update(data, 0, data.Length);
            return(crc.Value);
        }
Esempio n. 2
0
        public static ushort CRCMsg(byte[] msg, bool update = true)
        {
            EIGen3CRC16 crc = new EIGen3CRC16();

            crc.Update(msg, 0, 62);
            if (update)
            {
                ByteUtil.ToBytesLE(crc.Value, msg, 62);
            }
            return(crc.Value);
        }