Page 1 of 1
bArray in JCRE
Posted: Fri Nov 11, 2016 4:07 am
by dabluwt
There are two global array in JCRE implementation. They are bArray for Install method and APDU buffer.
what are their sizes ? Is it possible to store their references in class by the below code?
byte [] reference = bArray
Re: bArray in JCRE
Posted: Fri Nov 11, 2016 5:01 am
by Neqikoo
The bArray buffer for install method is the APDU buffer from the call to INSTALL. Usually it's 261 bytes.
Re: bArray in JCRE
Posted: Fri Nov 11, 2016 5:21 am
by afrascoi
The size depends on the card. And you can't store them in a reference due to the JCRE applet firewall.
Re: bArray in JCRE
Posted: Sun Nov 13, 2016 10:08 pm
by wumindejia
You can use short i;
i = (short)(bArray.length); in the install command.
byte[] buf = apdu.getBuffer();
short i = (short)(buf.length); in the process(APDU apdu).