Decode Method
Decode(ReadOnlyMemory<Byte>)
Decode the data given according to the format specified for the data object.
public void Decode(ReadOnlyMemory<byte> encodedData)
Parameters
Type | Name | Description |
---|---|---|
System.ReadOnlyMemory<System.Byte> | encodedData | The data to parse. |
Exceptions
Type | Condition |
---|---|
System.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.