Christmas is coming!

To celebrate the new year and thank for the support from all our dear customers, Christmas promotional activity is being held in JavaCardOS online store.

During the event, you can enjoy many promotional activities - High Discount on JavaCardOS products,Lucky Draw,Double forum Points.

Come to choose your own Christmas gift and try your luck now!

Xor calculation

JCIDE related questions and answers.

Moderators: product, kuafu

deepanshsinghal
Posts: 43
Joined: Thu Apr 06, 2017 8:01 am
Points: 416
Contact:

Xor calculation

Postby deepanshsinghal » Fri Aug 04, 2017 8:21 am

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

User avatar
UNKNwYSHSA
Posts: 628
Joined: Thu May 21, 2015 4:05 am
Points: 2971
Contact:

Re: Xor calculation

Postby UNKNwYSHSA » Sat Aug 05, 2017 1:11 pm

Please check the length of the responseCode, it's length shall greater or equal to the length of arqc!
sense and simplicity


Return to “Questions & Answers”

Who is online

Users browsing this forum: No registered users and 1 guest

JavaCard OS : Disclaimer