Assembly: CardWerk.SmartCard (in CardWerk.SmartCard.dll)
Public Class CardCommandAPDU
Implements ICloneable
This language is not supported or no code example is available.
public class CardCommandAPDU : ICloneable
This language is not supported or no code example is available.
public ref class CardCommandAPDU : public ICloneable^
This language is not supported or no code example is available.
Name | Description | |
---|---|---|
![]() |
CardCommandAPDU(byte, byte, byte, byte) | Construct CardCommandAPDU instance for an ISO 7816-4 case 1 "NODATA_NODATA" command. |
![]() |
CardCommandAPDU(byte, byte, byte, byte, byte[]) | Construct CardCommandAPDU instance for an ISO 7816-4 (short or extended) case 3 "DATA_NODATA" command. |
![]() |
CardCommandAPDU(byte, byte, byte, byte, byte[], int) | Construct CardCommandAPDU instance for an ISO 7816-4 (short or extended) case 4 "DATA_DATA" command. |
![]() |
CardCommandAPDU(byte, byte, byte, byte, int) | Construct CardCommandAPDU instance for an ISO 7816-4 (short or extended) case 2 "NODATA_DATA" command. |
Name | Description | |
---|---|---|
![]() |
CLA | Access to the class byte of an ISO 7816-4 command APDU. |
![]() |
Case | Indicates the "case" of this ISO 7816-4 command APDU. |
![]() |
INS | Access to the instruction byte of an ISO 7816-4 command APDU. |
![]() |
IsExtended | Indicates whether this is an extended ISO 7816-4 command APDU. |
![]() |
Lc | Access to the length field Lc of an ISO 7816-4 command APDU. This is the actual length of the data field. |
![]() |
Le | Access to the length field Le of an ISO 7816-4 command APDU. This is the expected length of the response data field. |
![]() |
P1 | Access to the first parameter byte of an ISO 7816-4 command APDU. |
![]() |
P2 | Access to the second parameter byte of an ISO 7816-4 command APDU. |
Name | Description | |
---|---|---|
![]() |
AppendData(byte) | Appends a single data byte to the data field of this command APDU. |
![]() |
AppendData(byte[]) | Appends the given data block to the data field of this command APDU. |
![]() |
AppendData(byte[], int, int) | Appends a single data byte to the data field of this command APDU. |
![]() |
Clone() | Creates a new object that is a copy of the current instance. |
![]() |
GenerateBytes() | Builds the final command APDU into a newly allocated byte array. |
![]() |
GetData() | Returns the data field of an ISO 7816-4 command APDU. |
![]() ![]() |
GetInstructionName(byte, byte) | Returns the instruction name for a given instruction byte. We currently support names defined in ISO 7816-4 1995 as well as PC/SC part 3. PC/SC part 3 kicks in, when CLA=0xFF is detected. |
![]() |
GetInstructionName() | Returns the ISO 7816-4 instruction name for the instruction byte in this command APDU. |
![]() ![]() |
ParseBytes(byte[]) | Creates a CardCommandAPDU instance by parsing a command APDU given as a byte array. |
![]() ![]() |
ParseBytes(byte[], int, int) | Creates a CardCommandAPDU instance by parsing a command APDU given as a range inside a byte array. |
![]() |
SetData(byte[]) | Adds or replaces the data field of this command APDU. |
![]() |
SetData(byte[], int, int) | Adds or replaces the data field of this command APDU. |
![]() |
ToString() | Returns a string that represents the current object. |
Name | Description | |
---|---|---|
![]() ![]() |
MAXEXTENDEDLC | (Immutable) The max size of the data field of an ISO 7816-4 command APDU with extended length fields. |
![]() ![]() |
MAXEXTENDEDLE | (Immutable) The max value for the field Le of an ISO 7816-4 command APDU with extended length fields. |
![]() ![]() |
MAXEXTENDEDLENGTH | (Immutable) The max length in bytes of an ISO 7816-4 command APDU with extended length fields. |
![]() ![]() |
MAXSHORTLC | (Immutable) The max size of the data field of an ISO 7816-4 command APDU with short length fields. |
![]() ![]() |
MAXSHORTLE | (Immutable) The max value for the field Le of an ISO 7816-4 command APDU with short length fields. |
![]() ![]() |
MAXSHORTLENGTH | (Immutable) The max length in bytes of an ISO 7816-4 command APDU with short length fields. |
![]() ![]() |
MINLENGTH | (Immutable) The min length of any ISO 7816-4 command APDU. |
This class supports command APDUs with short and extended length fields. If the data field size is up to and including a maximum size of 255 bytes, and the length of the expected data Le is in the range from 1 through 256, then a command APDU with a short length fields will be built. If either the data field size is 256 bytes or more, or Le is 257 or larger, then a command APDU with extended length fields will be built.
This class defines several useful constants that provide minimum and maximum limits of command APDU sizes and fields.
In order to create an all new command APDU from scratch start with one of the constructors of this class. In order to parse a raw command APDU from a byte array use one of the overloaded static ParseBytes methods.
Use the method GenerateBytes in order to build a raw command APDU byte array to be sent to a smart card. Note that parsing and rebuilding a command APDU may lead to a different byte representation.