While sending data from javacard in the form APDU commands using the apdu.sendBytesLong() Function, I am able to send 127 bytes data as response but 128 bytes data give error code 6f00(SW_UNKNOWN). Why is this happening and can anybody suggest the way around without splitting the data into two apdu commands.
le = apdu.setOutgoing();
if(le != 128)
ISOException.throwIt(ISO7816.SW_WRONG_LENGTH);
apdu.setOutgoingLength((byte)le);
apdu.sendBytesLong(mod_PkAIKR,(short)0, le);
where mod_PkAIKR is an byte array of 128 bytes.
Thank you
Change
apdu.setOutgoingLength((byte)le);
to
apdu.setOutgoingLength(le);
apdu.setOutgoing()
is short, it didn't needs type convert.(byte) 128
is -128
.