public String GetCRC16_2_kermit(Param p) { CRC16_2 c = new CRC16_2(Crc16Mode.CcittKermit); byte[] passBytes = Settings.GetEncoding().GetBytes(p.ValueToHash); byte[] result = c.ComputeChecksumBytes(passBytes); if (p.Fs == null) { return(BitConverter.ToString(result)); } else { return(""); } }
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); }