Crescendo SDK
|
Represents a BER-TLV (Binary Encoded Representation Tag-Length-Value) data buffer for PIV (Personal Identity Verification) data object handling. More...
Public Member Functions | |
BerTLVBuffer | AddTag (string tag, byte[]? data) |
Adds or updates a tag-value pair in the buffer. | |
BerTLVBuffer (byte[]? data, string berTLVTag) | |
Constructs a BER-TLV buffer from raw card response data. | |
byte[] | ConstructDataFieldFromBerTLVBuffer () |
Constructs complete PIV data field with tag list. | |
BerTLVBuffer | RemoveTag (string tag) |
Removes a tag-value pair from the buffer. | |
byte[] | ToByte () |
Serializes the buffer to BER-TLV formatted byte array. | |
Public Attributes | |
Dictionary< string, byte[]> | Content = new() |
Dictionary of TLV components (Tag-Length-Value entries) | |
bool | IsEmpty = true |
Indicates if the buffer contains no valid TLV data. | |
Properties | |
string | BERTLVTag = default! [get, set] |
Main BER-TLV tag identifier for the data object. | |
byte | GeneralTag = 0x53 [get, set] |
General encapsulation tag (default: 0x53 for Discovery Object) | |
Represents a BER-TLV (Binary Encoded Representation Tag-Length-Value) data buffer for PIV (Personal Identity Verification) data object handling.
Implements encoding/decoding of PIV data objects per NIST SP 800-73-4 specifications.
|
inline |
Constructs a BER-TLV buffer from raw card response data.
data | Raw BER-TLV formatted byte array (null creates empty buffer) |
berTLVTag | Main tag identifying the PIV data object |
Parsing behavior:
|
inline |
Adds or updates a tag-value pair in the buffer.
tag | 2-character hex tag identifier (e.g., "80") |
data | Tag value (null stores empty byte array) |
Automatically replaces existing entries with same tag
|
inline |
Constructs complete PIV data field with tag list.
|
inline |
Removes a tag-value pair from the buffer.
tag | 2-character hex tag identifier |
|
inline |
Serializes the buffer to BER-TLV formatted byte array.
Returns [GeneralTag, 0x00] for empty buffers
Dictionary<string, byte[]> CrescendoDLL.PCSC.BerTLVBuffer.Content = new() |
Dictionary of TLV components (Tag-Length-Value entries)
Key: 2-character hex string tag (e.g., "80") Value: Byte array containing tag's value
bool CrescendoDLL.PCSC.BerTLVBuffer.IsEmpty = true |
Indicates if the buffer contains no valid TLV data.
|
getset |
Main BER-TLV tag identifier for the data object.
Hexadecimal string representation of the tag (e.g., "5FC107")
|
getset |
General encapsulation tag (default: 0x53 for Discovery Object)
Defaults to 0x53 (Discovery Object Tag). May be 0x7E (Data Object Content Tag) for other PIV data objects.