Class DeleteKeyCommand
The DeleteKeyCommand is used to delete a PIV key from the target slot.
public class DeleteKeyCommand : IYubiKeyCommand<DeleteKeyResponse>
- Inheritance
-
objectDeleteKeyCommand
- 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
byteThe 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
ResponseApduThe return data with which the Yubikey responded to the DeleteKeyCommand
Returns
- DeleteKeyResponse
The DeleteKeyResponse for the DeleteKeyCommand