Show / Hide Table of Contents

ChangePuk Method

ChangePuk()

Change the PUK (PIN Unblocking Key), throw an exception if the user cancels.

C#
public void ChangePuk()

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 collection.

SecurityException

The remaining retries count indicates the PUK is blocked.

Remarks

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

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

In this article
Back to top Generated by DocFX