public static byte[] encode(byte[] data) { var input = new byte[data.Length - 2]; Array.Copy(data, 2, input, 0, input.Length); var loadaddress = (ushort)(data[0] | data[1] << 8); var output = new tobinary(input, model.parse(input), loadaddress).output; if (!verify(data, output)) { throw new Exception("verify fail"); } return output; }
public static byte[] encode(byte[] data) { var input = new byte[data.Length - 2]; Array.Copy(data, 2, input, 0, input.Length); var loadaddress = (ushort)(data[0] | data[1] << 8); var output = new tobinary(input, new path(input).output(), loadaddress).output; if (!verify(data, output)) { throw new Exception("verify fail"); } return(output); }