applet - Unable to send 128 Bytes data from Javacard but can send 127 Bytes as a response to APDU command when using sendBytesLong() -
while sending data javacard in form apdu commands using apdu.sendbyteslong() function, able send 127 bytes data response 128 bytes data give error code 6f00(sw_unknown). why happening , can suggest way around without splitting data 2 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 byte array of 128 bytes.
thank
change apdu.setoutgoinglength((byte)le);
apdu.setoutgoinglength(le);
- the parameter type of api
apdu.setoutgoing()
short, didn't needs type convert. - if convert le type byte, parameter value nagative. value of
(byte) 128
-128
.
Comments
Post a Comment