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(""); } }
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); }