TlvWriter Class
Namespace: Yubico.Core.Tlv Assembly: Yubico.Core.dllUse this class to build TLV (tag-length-value) constructions.
public sealed class TlvWriter : 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 |
---|---|
TlvWriter() | Create a new TlvWriter object. |
Methods
Name | Description |
---|---|
Clear() | Clear any data that had been copied from input. |
Encode() | Write out the encoding of the structure defined, returning a new byte array containing the result. |
GetEncodedLength() | Get the length the encoding will be. |
TryEncode(Span<Byte>, out Int32) | Write out the encoding of the structure defined, placing the result into the destination. |
WriteByte(Int32, Byte) | Add a byte as the value to be written out. |
WriteEncoded(ReadOnlySpan<Byte>) | Add an encoded byte array to be written out. |
WriteInt16(Int32, Int16, Boolean) | Add a 16-bit integer as the value to be written out. |
WriteInt32(Int32, Int32, Boolean) | Add a 32-bit integer as the value to be written out. |
WriteNestedTlv(Int32) | Start a new Nested TLV. |
WriteString(Int32, String, Encoding) | Add a string as the value to be written out. |
WriteUInt16(Int32, UInt16, Boolean) | Add an unsigned 16-bit integer as the value to be written out. |
WriteValue(Int32, ReadOnlySpan<Byte>) | Add a byte array as a value to be written out. |