Show / Hide Table of Contents

GetData Method

GetData()

Gets the number of PIN or PUK retries remaining, if applicable.

C#
public int? GetData()

Returns

int?

null if the PIN/PUK was successfully changed, or the number of retries remaining if the current PIN/PUK did 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 or PUK was successfully changed. GetData returns null.
AuthenticationRequiredThe PIN or PUK did not verify. GetData returns the number of retries remaining. If the number of retries is 0, the PIN or PUK is blocked.
In this article
Back to top Generated by DocFX