JCIDE related questions and answers.
Moderators: product, kuafu
-
deepanshsinghal
- Posts: 44
- Joined: Thu Apr 06, 2017 8:01 am
- Points :460
-
Contact:
Post
by 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
-
UNKNwYSHSA
- Posts: 630
- Joined: Thu May 21, 2015 4:05 am
- Points :3055
-
Contact:
Post
by 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
Users browsing this forum: Bing [Bot] and 27 guests
JavaCard OS : Disclaimer
Board Disclaimer
The views and comments posted in these fora are personal and do not necessarily represent the those of the Management of JavaCard OS.
The Management of JavaCard OS does not, under any circumstances whatsoever, accept any responsibility for any advice, or recommentations, made by, or implied by, any member or guest vistor of JavaCard OS that results in any loss whatsoever in any manner to a member of JavaCard OS, or to any other person.
Furthermore, the Management of JavaCard OS is not, and cannot be, responsible for the content of any other Internet site(s) that have been linked to from JavaCard OS.