Parses a sequence of TLV encoded data objects.

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

Public Sub Parse( _ 
ByVal vbData As Byte(), _ 
ByRef nOffset As Integer, _ 
ByRef nLength As Integer, _ 
ByVal nEncoding As CardDataObjectEncoding
)
This language is not supported or no code example is available.
public void Parse( 
byte[] vbData
ref int nOffset
ref int nLength
CardDataObjectEncoding nEncoding 
)
This language is not supported or no code example is available.
public:  
void Parse( 
array< Byte >^ vbData
int& nOffset
int& nLength
CardDataObjectEncoding nEncoding 
)
This language is not supported or no code example is available.
public function Parse( 
vbData : byte[], 
nOffset : int
nLength : int
nEncoding : CardDataObjectEncoding 
);
This language is not supported or no code example is available.

Parameters

vbData
Type: byte[]

Provides the raw binary data to be parsed. Must not be null.

nOffset
Type: int

[in,out] Offset in data array where parsing shall begin. This is updated to the offset of the first byte after the parsed data, which is always the same as adding nLength to the initial value of nOffset.

nLength
Type: int

[in,out] Number of bytes to consume from the given data array. If the final parsed data object is bigger than the remaining length, then a System.FormatException will be thrown. On return this parameter is reduced by the amount of bytes actually consumed and thus is always be zero.

nEncoding
Type: CardDataObjectEncoding

The expected type of TLV encoding. Through this parameter the caller can specify whether the data is BER-TLV or SIMPLE-TLV encoded.

Exception type Condition

ArgumentOutOfRangeException

Thrown when one or more arguments are outside the required range.

ArgumentNullException

Thrown when one or more required arguments are null.

If the parsed tag of any TLV data object of the parsed sequence indicates a constructed data object, then it will be recursively parsed until all contained data objects have been parsed. Thus effectively creating a tree of CardDataObjectList and CardDataObject instances.

Any empty filler bytes with the value 0x00 or 0xFF before, between or after the actual TLV data objects are skipped. This is also true for the content of any constructed data objects.

If the parsed data contains an invalid TLV encoding, or ends with an incomplete TLV data object, then a System.FormatException will be thrown.

All parsed data objects are added at the end of this list. If the nLength was zero, or the data only contains empty filler bytes, then nothing will be added.

.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