Quote Originally Posted by 2kaud View Post
Output is somewhat easier. Consider (NOT tried)

Code:
byte arr[11] = {2, 11};
arr[2] = mess;  // Set message byte
arr[3] = data1;
arr[4] = data2;
arr[5] = data3;
arr[6] = data4;
arr[7] = data5;
arr[8] = data6;
arr[9] = 3;
for (int i = 1; i < 9; ++i)
       arr[10] ^= arr[i];

for (int i = 0; i < 11; ++i)
      out.write(arr[i]);
This assumes that mess is the message and data1...data6 are the 6 data bytes.



How we set the data1,data2,data3 values?