Show / Hide Table of Contents

GetData Method

GetData()

Gets the number of PIN retries remaining, if applicable.

C#
public int? GetData()

Returns

int?

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