Page 1 of 1

How to give the key as the parameter of install() method

Posted: Fri Nov 27, 2015 2:08 am
by Danieken
Install method takes 3 parameters as the code shows.

Code: Select all

public static void install(byte[] bArray, short bOffset, byte bLength) 
    {
        new purse();
    }


In my applet, key is hardcoded and i want to give the key as the parameter of install() method.

How can I do this?

Re: How to give the key as the parameter of install() method

Posted: Wed Dec 02, 2015 7:56 am
by mabel
Normally a Java Card implementation also implements Global Platform. In that case the user parameters can be given as part of the INSTALL for INSTALL command.
It is important to provide the instance AID first. Then there is a specific format for the Application Specific Parameters (tag C9, then a length byte, then the parameters in binary). You need to parse this structure in the Java Card install method as well.