Show / Hide Table of Contents

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
InvalidOperationException

There is no KeyCollector loaded, or the YubiKey had some other error, such as unreliable connection.

OperationCanceledException

The user canceled PUK and PIN collection.

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.

In this article
Back to top Generated by DocFX