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 System.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) { PivKeyMetadata 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.

Generated by DocFX