ChangeManagementKey Method
ChangeManagementKey(PivTouchPolicy)
Change the management key, throw an exception if the user cancels. The new key will be Triple-DES.
public void ChangeManagementKey(PivTouchPolicy touchPolicy)
Parameters
Type | Name | Description |
---|---|---|
PivTouchPolicy | touchPolicy |
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. |
Remarks
This is the same as TryChangeManagementKey(PivTouchPolicy)
,
except this method will throw an exception if the KeyCollector
indicates user cancellation.
See the TryChangeManagementKey(PivTouchPolicy) method for further documentation on this method.
ChangeManagementKey(PivTouchPolicy, PivAlgorithm)
Change the management key, throw an exception if the user cancels. The new key will be of the specified algorithm.
public void ChangeManagementKey(PivTouchPolicy touchPolicy, PivAlgorithm newKeyAlgorithm)
Parameters
Type | Name | Description |
---|---|---|
PivTouchPolicy | touchPolicy | |
PivAlgorithm | newKeyAlgorithm |
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. |
Remarks
This is the same as
TryChangeManagementKey(PivTouchPolicy,PivAlgorithm)
,
except this method will throw an exception if the KeyCollecter
indicates user cancellation.
See the TryChangeManagementKey(PivTouchPolicy, PivAlgorithm) method for further documentation on this method.