Show / Hide Table of Contents

ChangePin Method

ChangePin()

Change the PIN, throw an exception if the user cancels.

C#
public void ChangePin()

Exceptions

Type Condition
InvalidOperationException

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

OperationCanceledException

The user canceled PIN collection.

SecurityException

The remaining retries count indicates the PIN is blocked.

Remarks

This is the same as TryChangePin, except this method will throw an exception if the KeyCollector indicates user cancellation.

See the TryChangePin() method for further documentation on this method.

In this article
Back to top Generated by DocFX