Generic utility class for evaluating and processing of smart card response APDUs according to ISO 7816-4.

Namespace: CardWerk.SmartCard
Assembly: CardWerk.SmartCard (in CardWerk.SmartCard.dll)

Public Class CardResponseAPDU 
Implements ICloneable
This language is not supported or no code example is available.
public class CardResponseAPDU : ICloneable
This language is not supported or no code example is available.
public ref class CardResponseAPDU  : public ICloneable^
This language is not supported or no code example is available.
public class CardResponseAPDU 
implements ICloneable
This language is not supported or no code example is available.
Name Description
Public constructor CardResponseAPDU(byte[], int, int, int) Construct a CardResponseAPDU instance from a the response data and the status word SW.
Public constructor CardResponseAPDU(byte[], int) Construct a CardResponseAPDU instance from a the response data and the status word SW.
Public constructor CardResponseAPDU(int) Construct a CardResponseAPDU instance that contains just a status word SW.
Top
Name Description
Public property IsCheckingError Is true when the status word indicates a checking error according to ISO 7816-4.
Public property IsError Is true when the status word indicates an error according to ISO 7816-4.
Public property IsExecutionError Is true when the status word indicates an execution error according to ISO 7816-4.
Public property IsExtended Indicates whether this is an extended ISO 7816-4 response APDU.
Public property IsSuccessful Is true when the status word indicates success according to ISO 7816-4.
Public property IsWarning Is true when the status word indicates a warning according to ISO 7816-4.
Public property Lr Provides the length Lr of an ISO 7816-4 response APDU. This is the actual length of the data field returned by GetData.
Public property SW Access to the status word of an ISO 7816-4 response APDU.
Public property SW1 Access to the byte SW1 of the status word of an ISO 7816-4 response APDU.
Public property SW2 Access to the byte SW2 of the status word of an ISO 7816-4 response APDU.
Top
Name Description
Public method AppendData(byte[]) Appends the given data block to the data field of this response APDU.
Public method Clone() Creates a new CardResponseAPDU instance that is a complete and deep copy of this CardResponseAPDU instance.
Public method GenerateBytes() Generates the complete response APDU into a newly allocated raw byte array.
Public method GetData() Returns the data field of an ISO 7816-4 response APDU.
Public method Static ParseBytes(byte[]) Creates a CardResponseAPDU instance by parsing a response APDU given as a byte array.
Public method Static ParseBytes(byte[], int, int) Creates a CardResponseAPDU instance by parsing a response APDU given as a range inside a byte array.
Public method SetData(byte[]) Adds or replaces the data field of this response APDU.
Public method SetData(byte[], int, int) Adds or replaces the data field of this response APDU.
Public method ToString() Formats this response APDU, including all its data, in a nice human readable fashion.
Public method TruncateData(int) Truncates the data block of this response APDU at the given size.
Top
Name Description
Public field Static MAXEXTENDEDLENGTH (Immutable) The max length in bytes of a single ISO 7816-4 response APDU when extended length fields are used.
Public field Static MAXEXTENDEDLR (Immutable) The max size of the data field of an ISO 7816-4 response APDU with extended length fields.
Public field Static MAXSHORTLENGTH (Immutable) The max length in bytes of a single ISO 7816-4 response APDU when short length fields are used.
Public field Static MAXSHORTLR (Immutable) The max size of the data field of an ISO 7816-4 response APDU with short length fields.
Public field Static MINLENGTH (Immutable) The min length of any ISO 7816-4 response APDU.
Top

.NET Framework

Supported in: 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

.NET Core

Supported in: 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0

.NET Standard

Supported in: 2.0