Show / Hide Table of Contents

GetMetadataResponse Class

Namespace: Yubico.YubiKey.Piv.Commands Assembly: Yubico.YubiKey.dll

The response to the get metadata command, containing information about a particular key.

C#
public sealed class GetMetadataResponse : PivResponse, IYubiKeyResponseWithData<PivMetadata>, IYubiKeyResponse
Inheritance object YubiKeyResponse PivResponse GetMetadataResponse
Implements
IYubiKeyResponseWithData<PivMetadata>
IYubiKeyResponse

Remarks

The Get Metadata command is available on YubiKey version 5.3 and later.

This is the partner Response class to GetMetadataCommand.

The data returned is a PivMetadata.

Example:

IYubiKeyConnection connection = key.Connect(YubiKeyApplication.Piv);
GetMetadataCommand metadataCommand = new GetMetadataCommand(0x9A);
GetMetadataResponse metadataResponse = connection.SendCommand(metadataCommand);
if (metadataResponse.Status == ResponseStatus.Success)
{
    PivMetadata keyData = metadataResponse.GetData();
}

Constructors

Name Description
GetMetadataResponse(ResponseApdu, byte)

Constructs a GetMetadataResponse based on a ResponseApdu received from the YubiKey.

Properties

Name Description
SlotNumber

The slot for which the metadata is returned.

Methods

Name Description
GetData()

Gets the metadata from the YubiKey response.

In this article
Back to top Generated by DocFX