Our Online Store have the new products: RFID antenna board. Currently it can work with JC10M24R and JCOP4 card chips.
Compared with normal cards, the antenna board module has a smaller size and fixed holes, which is easy to integrate in the IOT(Internet Of Things) project.

personalisation

JavaCard Applet Development Related Questions and Answers.
naresh
Posts: 20
Joined: Fri May 11, 2018 11:29 am
Points :382
Contact:

personalisation

Post by naresh » Thu Jul 26, 2018 7:46 am

Hello sir,
How i can check whether the my applet is personalized or not...?
Regards,
Thammineni Naresh.

kuafu
Posts: 317
Joined: Thu Jun 25, 2015 2:09 am
Points :4551
Contact:

Re: personalisation

Post by kuafu » Thu Jul 26, 2018 10:22 pm

Code: Select all

package PA ;

import javacard.framework.*;

public class few extends Applet
{ 
	
   
	public static void install(byte[] bArray, short bOffset, byte bLength) 
	{
		new few().register(bArray, (short) (bOffset + 1), bArray[bOffset]);
	}
	
	 few(){
		 personalized = false;
	 }
    public boolean personalized ;
    void process_personalized(){
	    // check whether the my applet is personalized or not
	    if(personalized){
		    ISOException.throwIt(ISO7816.SW_CONDITIONS_NOT_SATISFIED);
	    }
	    // do  personalized stuff
	    
	    // ....
	    
	    // set personalized true;
	    personalized = true;
    }
	public void process(APDU apdu)
	{
		if (selectingApplet())
		{
			return;
		}
        
		byte[] buf = apdu.getBuffer();
		switch (buf[ISO7816.OFFSET_INS])
		{
		case (byte)0x00:
			process_personalized();
			break;
		default:
			ISOException.throwIt(ISO7816.SW_INS_NOT_SUPPORTED);
		}
	}

}
Using a boolean variable to mark the state of personalized .
well

Post Reply Previous topicNext topic

Who is online

Users browsing this forum: Google [Bot] and 37 guests

JavaCard OS : Disclaimer