Show / Hide Table of Contents

Decode Method

Decode(ReadOnlyMemory<byte>)

Decode the data given according to the format specified for the data object.

C#
public void Decode(ReadOnlyMemory<byte> encodedData)

Parameters

Type Name Description
ReadOnlyMemory<byte> encodedData

The data to parse.

Exceptions

Type Condition
ArgumentException

The data is not properly encoded for the data object.

Remarks

This will parse the encoding and set local properties with the data. The encodedData generally was retrieved from the YubiKey.

This will replace any data in the object.

If there is no data (encodedData.Length is 0) this method will set the object to the empty state (IsEmpty will be true and the contents of any data properties will be meaningless).

If the input is not encoded as expected, this method will throw an exception. This includes the fixed values. That is, there are some values in some data objects that are fixed for every YubiKey, and this method will expect the contents of the encodedData to contain those fixed values.

In this article
Back to top Generated by DocFX