How to reduce javacard applet size

I wrote an applet with a size of 19 KB on disk. It has three classes. The first one extends from the applet, then the second of them has static functions and the third one is the class that I create an instance of from it in my applet.

I have three questions:

  • Is there a way to find out what size my applet instance in my javacard takes?
  • Is there a tool to reduce the size of the javacard applet (.cap file)?
  • Can you explain the rules that will help me reduce the size of the applet?
+4
source share
2 answers
  • Is there a way to find out what size my applet instance in my javacard takes?
  • (AFAIK) There is no official way to do this (in the GlobalPlatform / Java Card).

  • (, , ), , , ). :

    • JCSystem.getAvailableMemory() (. ), ( ).

    • , GET DATA (. TS 102 226) ( ).

    • ( ).

  • .cap , , - , , , .

  • , JCOP Tools eclipse, , .

  • - ( , ).

  1. javacard- ( .cap)?
  1. , ?
  • , , , - - Java- - : (

  • , , .


() :

  • , .

  • , , .

  • , , (AFAIK).

  • , , .

  • !

!

+6

3. , ?

:

  • , , -, - , . get/set. , 200 .

  • 4 . , , .

  • APDU , EEPROM 1000 , .

  • javacard, .

  • . , .

:

if (arr[index1] == 1) do this;
OR
if (arr[index1] == 2) do this;
OR
if (arr[index1] == 3) do this;

:

temp = arr[index1];
if (temp == 1) do this;
OR
if (temp == 2) do this;
OR
if (temp == 3) do this;
  1. if-else switch, .
+3

Source: https://habr.com/ru/post/1676741/


All Articles