UnpackValue Method
UnpackValue(Int32, ReadOnlySpan<Byte>)
Decode a single TLV encoded object, returning only the value.
C#
public static Memory<byte> UnpackValue(int expectedTag, ReadOnlySpan<byte> tlvData)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | expectedTag | The expected tag value of the given TLV data |
System.ReadOnlySpan<System.Byte> | tlvData | The TLV data |
Returns
System.Memory<System.Byte>
The value of the TLV
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | If the TLV tag differs from expectedTag |