Page 1 of 1

HOW TO DEAL WITH THE COMMAND DATA ??

Posted: Wed Aug 15, 2018 7:33 am
by OSSAMA
Dear All,
Thank you in advance as I am new to the Java card technology.
I am trying to check the first byte in the command data as shown in the example code.
I have declared the apduBuffer as
byte[] apduBuffer = apdu.getBuffer();
my problem is the code always process the else and never ever do the if. regardless of whatever value in the command data.
How can I deal with the command data ?
if (apduBuffer [0] > 30)
{
xx (apdu,LEN);
break;
}
else
ISOException.throwIt (SW_APPLET_SELECT_FAILED);
Best Regards

Re: HOW TO DEAL WITH THE COMMAND DATA ??

Posted: Thu Aug 16, 2018 3:14 am
by kuafu
Do your select the applet first.
Look , mine is fine .