This is part of the code.
Code: Select all
apdu = new Apdu();
apdu.command[Apdu.CLA] = TestComm.CLA_MYAPPLET;
apdu.command[Apdu.P1] = 0x00;
apdu.command[Apdu.P2] = 0x00;
apdu.command[Apdu.INS] = TestComm.INS_GENERATE_SIGN;
cad.exchangeApdu(apdu);
if (apdu.getStatus() != 0x9000) {
System.out.println("Errorr : status word different from 0x9000");
} else {
. . .
I thought that I could give data through P1, but it only accepts a single byte and I have to transmit an array of byte. I am confused. Does anyone give me a clear explanations?