ResetPin Method
ResetPin()
Reset the PIN, using the PUK (PIN Unblocking Key), throw an exception if the user cancels.
C#
public void ResetPin()
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | There is no |
System.OperationCanceledException | The user canceled PUK and PIN collection. |
System.Security.SecurityException | The remaining retries count indicates the PUK is blocked. |
Remarks
This is the same as TryResetPin
, except this method will
throw an exception if the KeyCollector
indicates user
cancellation.
See the TryResetPin() method for further documentation on this method.
If the PUK is blocked, this method will not execute. Note that if a YubiKey is configured PIN-only, the PUK will be blocked.