Documentation ¶
Overview ¶
Package cap implements the parsing of Java Card converted applets (CAP) and providing them in an installable format.
Index ¶
Constants ¶
View Source
const ( ComponentHeader = 1 // ComponentHeader is the tag of the Header component. ComponentDirectory = 2 // ComponentDirectory is the tag of the Directory component. ComponentApplet = 3 // ComponentApplet is the tag of the Applet component. ComponentImport = 4 // ComponentImport is the tag of the Import component. ComponentConstantPool = 5 // ComponentConstantPool is the tag of the ConstantPool component. ComponentClass = 6 // ComponentClass is the tag of the Class component. ComponentMethod = 7 // ComponentMethod is the tag of the Method component. ComponentStaticField = 8 // ComponentStaticField is the tag of the StaticField component. ComponentReferenceLocation = 9 // ComponentReferenceLocation is the tag of the ReferenceLocation component. ComponentExport = 10 // ComponentExport is the tag of the Export component. ComponentDescriptor = 11 // ComponentDescriptor is the tag of the Descriptor component. ComponentDebug = 12 // ComponentDebug is the tag of the Debug component. )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CAP ¶
type CAP struct { Header Header // Header is the representation of the Header component. Imports []Package // Imports is a list of imported packages contained in the the Import component. Applets [][]byte // Applets is a list of AIDs of applets that are contained in the Applet component. JavaCardVersion MMPVersion // JavaCardVersion is the targeted JavaCard Version of the CAP. GPCardAPIVersion *MMVersion // Optional imported GlobalPlatform Card API Version. // contains filtered or unexported fields }
CAP is a Converted Applet that contains a package with optional applets that can be loaded onto a JavaCard.
type Component ¶
type Component struct { Tag uint8 // Tag indicates the kind of component. Size uint16 // Size indicates the number of bytes in the info field of the component, not including tag and size. Info []byte // Info and its contents vary with the type of component. }
Component is the general format of a CAP file component.
type Header ¶
type Header struct { // The minor_version and major_version items are the minor and major version numbers of this CAP file. CapFileVersion MMVersion // Indicates if the Java int type is used in this package. UsesInteger bool // Indicates if a CAP file contains an Export Component. ContainsExport bool // Indicates if a CAP file contains an Applet Component. ContainsApplet bool // Package describes the package defined in this CAP file. Package Package // Optional name of the package defined in this CAP file. PackageName string }
The Header Component contains general information about this CAP file and the package it defines.
type MMPVersion ¶
MMPVersion is a version that consists of a major, minor and version number.
type Package ¶
type Package struct { // The minor_version and major_version items are the minor and major version numbers of this package. // These values uniquely identify the particular implementation of this package and indicate the binary //compatibility between packages. Version MMVersion // The AID represents the Java Card platform name of the package. AID []byte }
Package is a JavaCard package identified by an AID with a version.
Click to show internal directories.
Click to hide internal directories.