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.

applet component

JavaCard Applet Development Related Questions and Answers.
lenosrd
Posts: 4
Joined: Thu Mar 10, 2016 3:14 am
Points :44
Contact:

applet component

Post by lenosrd » Fri Apr 15, 2016 1:45 am

In JCVM v3.0.4 Classic Edition, the applet component is described as

applet_component {
u1 tag
u2 size
u1 count
{ u1 AID_length
u1 AID[AID_length]
u2 install_method_offset
} applets[count]
}


As we can see, the applet AID is present in applet component. But how can I get these instances of the structure in the my programming? Or some information about applet?
How can I find out the root applet?

Liguwu
Posts: 10
Joined: Thu Apr 07, 2016 1:40 am
Points :78
Contact:

Re: applet component

Post by Liguwu » Fri Apr 15, 2016 3:36 am

FYI

Code: Select all

struct AppletInfo{
     char AID_length;
     char AID[]; //size = AID_length
};

struct AppletComponent{
  char Tag;
  short int Size;
  char Count;
  AppletInfo Applets[];
};

AppletInfo* NextApplet(AppletInfo* Applet){
  return (AppletInfo*)&Applet->AID[Applet->AID_length];
}


int _tmain(int argc, _TCHAR* argv[])
{
   AppletComponent * aplComp;
   //.....
   AppletInfo *Applet = &aplComp->Applets[0];
   //to get the next call applet, but not more than Count-1 {-1 because the first one we've already got}
   Applet = NextApplet(Applet);
   return 0;
}


Crawford
Posts: 39
Joined: Thu Sep 17, 2015 11:50 pm
Points :246
Contact:

Re: applet component

Post by Crawford » Fri Apr 15, 2016 5:57 am

There is no root applet. Each applet is just packaged in a flat way inside the CAP file as if they were just different classes.

Pf6KINE
Posts: 18
Joined: Wed Apr 13, 2016 2:03 am
Points :148
Contact:

Re: applet component

Post by Pf6KINE » Sat Apr 16, 2016 3:29 am

Code: Select all

PAppletInfo = ^TAppletInfo;
  TAppletInfo = packed record
  private
    function GetInstallMethodOffset: TShort;
  public
    AID_length: Byte;
    AID: Array[0..0] of byte; //size = AID_length
    (*
    InstallMethodOffset: Word;
    *)
    property InstallMethodOffset: TShort read GetInstallMethodOffset;
  end;

  PAppletComponent = ^TAppletComponent;
  TAppletComponent = packed record
    Tag: TComponentType;
    Size: TShort;
    Count: Byte;
    Applets: Array[0..0] of TAppletInfo;  //size = Count
  end;

function TAppletInfo.GetInstallMethodOffset: TShort;
begin
  Result := PWord(@AID[AID_length])^;
end;

Post Reply Previous topicNext topic

Who is online

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

JavaCard OS : Disclaimer