TlvReader Class
Namespace: Yubico.Core.Tlv Assembly: Yubico.Core.dllUse this class to parse TLV (tag-length-value) constructions.
public sealed class TlvReader : Object
Remarks
See the User's Manual entry on TLV for an in-depth discussion of what TLV is and a general description of how to use this class.
Constructors
Name | Description |
---|---|
TlvReader(ReadOnlyMemory<Byte>) | Build a new Reader object based on the given encoding. |
Properties
Name | Description |
---|---|
HasData | Indicates whether there is more data to read or not. |
Methods
Name | Description |
---|---|
PeekLength(Int32) | Skip the |
PeekTag(Int32) | Read the tag at the current data position, without advancing the reader. |
ReadByte(Int32) | Read the TLV at the current position, return the value as a byte, and move the position to the byte beyond the current TLV. |
ReadEncoded(Int32) | Return the entire encoding of the next element. |
ReadInt16(Int32, Boolean) | Read the TLV at the current position, return the value as a short (a two-byte integer), and move the position to the byte beyond the current TLV. |
ReadInt32(Int32, Boolean) | Read the TLV at the current position, return the value as an int (a four-byte integer), and move the position to the byte beyond the current TLV. |
ReadNestedTlv(Int32) | Read the TLV at the current position as a NestedTlv. Return a new TlvReader object whose position is the beginning of the NestedTlv's value, which is the tag of the NestedTlv's first sub-element. Move the position of the original reader to the byte beyond the current TLV. |
ReadString(Int32, Encoding) | Read the TLV at the current position, return the value as a string, and move the position to the byte beyond the current TLV. |
ReadUInt16(Int32, Boolean) | Read the TLV at the current position, return the value as an unsigned short (a two-byte unsigned integer), and move the position to the byte beyond the current TLV. |
ReadValue(Int32) | Read the TLV at the current position, return the value as a byte array, and move the position to the byte beyond the current TLV. |
TryReadByte(out Byte, Int32) | Try to read the TLV at the current position. If this succeeds, return
true and set the |
TryReadEncoded(out ReadOnlyMemory<Byte>, Int32) | Try to read the TLV at the current position. If this succeeds, return
true and set the |
TryReadInt16(out Int16, Int32, Boolean) | Try to read the TLV at the current position. If this succeeds, return
true and set the |
TryReadInt32(out Int32, Int32, Boolean) | Try to read the TLV at the current position. If this succeeds, return
true and set the |
TryReadNestedTlv(out TlvReader, Int32) | Try to read the TLV at the current position as a NestedTlv. If this
succeeds, return true and set the |
TryReadString(out String, Int32, Encoding) | Try to read the TLV at the current position. If this succeeds, return
true and set the |
TryReadUInt16(out UInt16, Int32, Boolean) | Try to read the TLV at the current position. If this succeeds, return
true and set the |
TryReadValue(out ReadOnlyMemory<Byte>, Int32) | Try to read the TLV at the current position. If this succeeds, return
true and set the |