Generic utility class for evaluating and generating Basic-Encoding-Rules (BER) encoded Tag- Length-Value (TLV) data objects.

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

Public Class CardDataObject
This language is not supported or no code example is available.
public class CardDataObject
This language is not supported or no code example is available.
public ref class CardDataObject 
This language is not supported or no code example is available.
public class CardDataObject
This language is not supported or no code example is available.
Name Description
Public constructor CardDataObject(int) Constructs an empty constructed data object.
Public constructor CardDataObject(int, byte[]) Constructs a primitive data object with the given tag and data.
Top
Name Description
Public property IsConstructed Indicates whether this data object is a constructed data object.
Public property Length Provides the length of the value data of a primitive data object.
Public property List Provides the list of data objects contained in this constructed data object.
Public property Tag Provides access to the tag of this data object.
Public property Value Provides access to the value data of a primitive data object.
Top
Name Description
Public method ComputeTotalSize(CardDataObjectEncoding) Computes the total size of the encoded data object including its tag, the length field and the value data.
Public method Find(int, bool) Finds a contained data object with a given tag.
Public method Generate(CardDataObjectEncoding) Encodes this data object using TLV encoding into a byte array.
Public method GetBitStringValue() Retrieve the primitive value of this data object as a bit string encoded according to ASN.1.
Public method GetIntegerValue() Retrieve the primitive value of this data object as an integer encoded according to ASN.1.
Public method GetStringValue(Encoding) Retrieve the primitive value of this data object as a string.
Public method Static Parse(byte[], ref int, ref int, CardDataObjectEncoding) Parses a single primitive or constructed TLV encoded data object from the given raw data.
Public method Static Parse(byte[]) Parses a single primitive or constructed BER-TLV encoded data object from the given raw data.
Public method Static ParseSimple(byte[]) Parses a single SIMPLE-TLV encoded data object from the given raw data.
Public method SetStringValue(Encoding, string) Set the primitive value of this data object from a string.
Public method ToString() Convert this object into a string representation.
Top

This utility class is very simple and may not suite all needs for dealing with TLV structures. Anyway it can be used to process most BER-TLV or SIMPLE-TLV encoded data objects.

.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