PinProtectedData Class
Namespace: Yubico.YubiKey.Piv.Objects Assembly: Yubico.YubiKey.dllUse this class to process a specific set of PIN-protected data stored in the PRINTED data object.
public sealed class PinProtectedData : PivDataObject, IDisposable
Implements
Remarks
Some Data Objects are retrievable only in a session where the PIN has been verified. Hence, that data is PIN-protected. This class will be able to process data stored in one such Data Object. The data this class can process is specified by its properties.
See the User's Manual entry on PIV data objects for a description of the details of how this class works.
This class specifies the DefinedDataTag
to be 0x005FC109
which is the data tag for the PRINTED storage area. The reason is that
the PRINTED area requires the PIN to read. The data is stored in this
object and when it is needed, simply retrieve it and use it. In order to
retrieve, though, PIN verification is required, so in this way the data
is PIN-protected.
This class does not allow changing the DataTag
. That is, it is
possible to store the data in this set only in the PRINTED area.
This class is different from other PivDataObjects
. Most such
classes store information encoded as the PIV standard defines it.
However, this class stores the elements specified by
PinProtectedDataType
following a definition that is not the PIV
standard for PRINTED.
Note that this object can accept or decode only elements for which there is a property.
Constructors
Name | Description |
---|---|
PinProtectedData() | Build a new object. This will not get the PIN-protected data from the YubiKey, it will only build an "empty" object. |
Properties
Name | Description |
---|---|
ManagementKey | The management key that will be PIN-protected. If there is no management key, this will be null. |
Methods
Name | Description |
---|---|
Dispose(Boolean) | Releases any unmanaged resources and overwrites any sensitive data. |
Encode() | Build the encoding of the data. |
GetDefinedDataTag() | Get the defined data tag. This is the data tag that the PIV standard or Yubico defines to specify the given data object. |
IsValidAlternateTag(Int32) | Override the base class. This class does not allow alternate DataTags. The only allowed tag is the defined. |
SetManagementKey(ReadOnlyMemory<Byte>) | Set the |
TryDecode(ReadOnlyMemory<Byte>) | Try to decode the data given according to the format specified for
the data object. If successful, return |