ISCardISO7816

The ISCardISO7816 interface provides methods for implementing ISO 7816-4 functionality. With the exception of ISCardISO7816::SetDefaultClassId, these methods create an APDU command that is encapsulated in a ISCardCmd object.

The ISO 7816-4 specification defines standard commands available on smart cards. The specification also defines how a smart card Application Protocol Data Unit (APDU) command should be constructed and sent to the smart card for execution. This interface automates the building process.

The following example shows a typical use of the ISCardISO7816 interface. In this case, the ISCardISO7816 interface is used to build an APDU command.

    To submit a transaction to a specific card
  1. Create an ISCardISO7816 and ISCardCmd interface. The ISCardCmd interface is used to encapsulate the APDU.
  2. Call the appropriate method of the ISCardISO7816 interface, passing the required parameters and the ISCardCmd interface pointer.
  3. The ISO 7816-4 APDU command will be built and encapsulated in the ISCardCmd interface.
  4. Release the ISCardISO7816 and ISCardCmd interfaces.

Note In the method reference pages, if a bit sequence in a table is not defined, assume that bit sequence is reserved for future use or proprietary to a specific vendor).

Methods

ISCardISO7816 Methods Description
AppendRecord Constructs a command that appends a record to the end of an elementary file (EF).
EraseBinary Sets part of the content of an elementary to its logical erased state, sequentially, starting from a given offset.
ExternalAuthenticate Conditionally updates the security status using the result of the computation by the card, based on a challenge previously issued by the card (for example, by the INS_GET_CHALLENGE command), a possibly secret key stored in the card, and authentication data transmitted by the interface device.
GetChallenge Requires the issuing of a challenge for use in a security-related procedure.
GetData Retrieves a single primitive data object or a set of data objects contained in a constructed data object, based on the type of file specified.
GetResponse Transmits from the card to the interface device APDU(s) that otherwise could not be transmitted by the available protocols.
InternalAuthenticate Initiates the computation of the authentication data by the card using the challenge data sent from the interface device and a relevant secret stored in the card.
ManageChannel Opens and closes logical channels.
PutData Stores one primitive data object, or one or more data objects contained in a constructed data object, within the current resource manager context.
ReadBinary Constructs a command that acquires a response message that gives that part of the contents of an EF with transparent structure.
ReadRecord Constructs a command that reads the contents of the specified records of an elementary file.
SelectFile Sets a current file within a logical channel.
SetDefaultClassId Assigns a standard class ID byte that will be used in all operations when constructing an ISO 7816-4 command APDU.
UpdateBinary Initiates the update of the bits already present in an EF with the bits given in the command APDU.
UpdateRecord Constructs a command that initiates the updating of a specific record.
Verify Initiates the comparison in the card of the verification data sent from the interface device with the reference data stored in the card.
WriteBinary Initiates the writing of binary values into an EF.
WriteRecord Constructs a command that writes a record.