A problem about storing data larger than 128 bytes in javacard
Posted: Wed Dec 23, 2015 2:02 am
I run into a problem when storing data larger than 128 bytes in javacard.
part of my code
When I run my applet, it returns sw=0x6F00. How can I modify my code so that it can work well?
part of my code
Code: Select all
private void Write1(APDU apdu) throws ISOException
{
apdu.setIncomingAndReceive();
byte[] apduBuffer = apdu.getBuffer();
byte j = (byte)apduBuffer[4]; // Return incoming bytes lets take 160
Buffer1 = new byte[j]; // initialize a array with size 160
for (byte i=0; i<j; i++)
Buffer1[(byte)i] = (byte)apduBuffer[5+i];
}
When I run my applet, it returns sw=0x6F00. How can I modify my code so that it can work well?