MoveKey Method
MoveKey(Byte, Byte)
Moves a key from one slot to another. The source slot must not be the Attestation-slot and the destination slot must be empty.
public void MoveKey(byte sourceSlot, byte destinationSlot)
Parameters
Type | Name | Description |
---|---|---|
System.Byte | sourceSlot | The Yubikey slot of the key you want to move. This must be a valid slot number. |
System.Byte | destinationSlot | The target Yubikey slot for the key you want to move. This must be a valid slot number. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | There is no |
MalformedYubiKeyResponseException | The YubiKey returned malformed data and authentication, either single or double, could not be performed. |
System.OperationCanceledException | The user canceled management key collection. |
System.Security.SecurityException | Mutual authentication was performed and the YubiKey was not authenticated. |
System.NotSupportedException | Thrown when the Yubikey doesn't support the Move-operation. |
Remarks
Internally this method attempts to authenticate to the Yubikey by calling AuthenticateManagementKey(Boolean) which may in turn throw its' own exceptions.