Пример #1
0
        public String GetCRC8(Param p)
        {
            byte[] passBytes = Settings.GetEncoding().GetBytes(p.ValueToHash);
            byte   result    = CRC8.ComputeChecksum(passBytes);

            if (p.Fs == null)
            {
                return(result.ToString("X2"));
            }
            else
            {
                return("");
            }
        }
Пример #2
0
        public void fctTest()
        {
            Param p = new Param {
                ValueToHash = "password"
            };



            CRC8.ComputeChecksum();

            string input = "8000";
            var    bytes = Util.HexToBytes(input);
            string hex   = CRC16.ComputeChecksum(bytes).ToString("x2");

            Console.WriteLine(hex); //c061

            CRC16_2 c = new CRC16_2(Crc16Mode.Standard);
        }