Exemple #1
0
        public String GetCRC16(Param p)
        {
            byte[] passBytes = Settings.GetEncoding().GetBytes(p.ValueToHash);
            ushort result    = CRC16.ComputeChecksum(passBytes);

            if (p.Fs == null)
            {
                return(result.ToString("X2"));
            }
            else
            {
                return("");
            }
        }
Exemple #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);
        }