Page 1 of 1

Some APDU commands and questions

Posted: Fri Jan 08, 2016 6:24 am
by nobody2015
The following APDU commands is in my my summary, in the process of my reading this applet.

Anyone can correct and supplement.

//select applet
00A4040008A00000052721010100;

//handlePut
800100000E7102353673042101000078017A04;

//handleCalc (calculateTruncated)
80A200010771023536740202;

//handleCalc, the response of this APDU is the Message Digest of SHA1/SHA256
80A200000771023536740101;

// handleCalcAll: the part of handleCalc() function
80A400000774010171023536;

//handleList: List all the object list. It contains Name and keyType, and you can added it use handlePut() function
80A1000000;


//handleChangeCode:In here, I don't know how should I fill the data of RESPONSE_TAG(0x75), in order to meet the following codes?

Code: Select all

if(Util.arrayCompare(buf, offs, tempBuf, _0, len) == 0) {
            OathObj oldAuth = authObj;
            authObj = scratchAuth;
            scratchAuth = oldAuth;
            oldAuth.setActive(false);
            authObj.setActive(true);
         } else {
            ISOException.throwIt(ISO7816.SW_DATA_INVALID);
         }

80030000207304210101017401017514(CalacValue ???)

Re: Some APDU commands and questions

Posted: Thu Jan 14, 2016 9:42 pm
by UNKNwYSHSA
From the method handleCalc(), the tempBuf contains the last result calculated. So the input data in the buf is the code calculated last time before.

Re: Some APDU commands and questions

Posted: Fri Apr 01, 2016 2:28 am
by nobody2015
UNKNwYSHSA wrote:From the method handleCalc(), the tempBuf contains the last result calculated. So the input data in the buf is the code calculated last time before.


3q