As you see below, add method adds 5 units to a declared variable. I would like to save the variable value into the card after making an operation. Does anyone know how can i write that value into the card? And if possible, how can i read it?
Code: Select all
byte[] buffer = apdu.getBuffer();
byte CLA = (byte) (buffer[ISO7816.OFFSET_CLA] & 0xFF);
byte INS = (byte) (buffer[ISO7816.OFFSET_INS] & 0xFF);
if (CLA != DE_CLA){
ISOException.throwIt(ISO7816.SW_CLA_NOT_SUPPORTED);
}
switch (INS) {
case DE_INS_ADD:
add(apdu);
break;
default:
ISOException.throwIt(ISO7816.SW_INS_NOT_SUPPORTED);
}