Show / Hide Table of Contents

GetData Method

GetData()

Gets the number of PUK retries remaining, if applicable.

C#
public int? GetData()

Returns

int?

null if the PIN is reset, or the number of retries remaining if the PUK does not verify.

Implements

IYubiKeyResponseWithData<TData>.GetData()

Exceptions

Type Condition
InvalidOperationException

Thrown if Status is not Success or AuthenticationRequired.

Remarks

First look at the Status. If Status is not one of the following values then an error has occurred and GetData() will throw an exception.

StatusDescription
SuccessThe PIN was successfully reset. GetData returns null.
AuthenticationRequiredThe PUK did not verify. GetData returns the number of retries remaining. If the number of retries is 0, the PUK is blocked.
In this article
Back to top Generated by DocFX