Table of Contents

Class DeleteKeyCommand

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

The DeleteKeyCommand is used to delete a PIV key from the target slot. Any key, including the attestation key, can be deleted.

public class DeleteKeyCommand : IYubiKeyCommand<DeleteKeyResponse>
Inheritance
object
DeleteKeyCommand
Implements

Constructors

DeleteKeyCommand()

Constructor for the DeleteKeyCommand, which is used to delete a PIV key from a slot.

public DeleteKeyCommand()

DeleteKeyCommand(byte)

Constructor for the DeleteKeyCommand, which is used to delete a PIV key from a slot.

public DeleteKeyCommand(byte slotToClear)

Parameters

slotToClear byte

The YubiKey slot of the key you want to clear.

Properties

Application

Gets the YubiKeyApplication to which this command belongs. For this command, it's PIV.

public YubiKeyApplication Application { get; }

Property Value

YubiKeyApplication

YubiKeyApplication.Piv

SlotToClear

The Yubikey slot of the key you want to delete.

public byte SlotToClear { get; set; }

Property Value

byte

Methods

CreateCommandApdu()

Constructs a CommandApdu for the delete operation.

public CommandApdu CreateCommandApdu()

Returns

CommandApdu

The CommandApdu that targets the delete operation with the correct parameters.

CreateResponseForApdu(ResponseApdu)

Creates the DeleteKeyResponse from the ResponseApdu data.

public DeleteKeyResponse CreateResponseForApdu(ResponseApdu responseApdu)

Parameters

responseApdu ResponseApdu

The return data with which the Yubikey responded to the DeleteKeyCommand

Returns

DeleteKeyResponse

The DeleteKeyResponse for the DeleteKeyCommand