How can I give a key value as a parameter to the install () method?

In my applet, the key is hard-coded, and I want to give this key as a parameter to the install() method.

The installation method accepts 3 parameters as

install(byte[] bArray, short bOffset, byte bLength)

How can I specify the key value as a parameter to the installation method?

+4
source share
1 answer

Typically, a Java Card implementation also implements the Global Platform. In this case, user parameters can be specified as part of the INSTALL command for INSTALL. The global platform map specification is available for free, although registration is required.

You can find the parameter specification in 11.5.2.3.7 INSTALL Command Parameters of the provided document. It is important to provide the AID of the instance first. Then there is a specific format for application parameters ( C9 tag, then length bytes, and then parameters in binary format). You also need to analyze this structure in the Java map installation method.

If you cannot debug the installation method, then return the parameters as response data from the test APDU.

+5
source

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


All Articles