Page 1 of 1

Xor calculation

Posted: Fri Aug 04, 2017 8:21 am
by deepanshsinghal
Hi everyone,

i am calculating XOR like this,

Code: Select all

   public static byte[] xor(byte[] arqc, byte[] responseCode) {

      byte[] c = new byte[arqc.length];
      for (short i = 0; i < arqc.length; i++) {
         c[i] = (byte) (arqc[i] ^ responseCode[i]);
      }

      return c;
   }


is there any other way to calculate XOR because i think it might be the reason of giving the response "6F 00"

Regards,
Deepansh

Re: Xor calculation

Posted: Sat Aug 05, 2017 1:11 pm
by UNKNwYSHSA
Please check the length of the responseCode, it's length shall greater or equal to the length of arqc!