TryVerifyPin Method
TryVerifyPin()
For a version 4 FIPS series YubiKey that has a PIN set on the U2F
application, this will call on the KeyCollector to
obtain the current PIN and verify it. If the caller cancels (the
return from the KeyCollector
is false
), this will
return false
.
public bool TryVerifyPin()
Returns
A boolean, true
if the PIN is verified, false
if the user
cancels PIN collection.
Exceptions
Type | Condition |
---|---|
System.Security.SecurityException | The YubiKey is not version 4 FIPS series, or the PIN is blocked. |
Remarks
See the documentation for VerifyPin() for more information on verifying a PIN.
TryVerifyPin(ReadOnlyMemory<Byte>)
For a version 4 FIPS series YubiKey that has a PIN set on the U2F
application, this try to verify the given pin
. If the PIN is
not verified, this method will return false
.
public bool TryVerifyPin(ReadOnlyMemory<byte> pin)
Parameters
Type | Name | Description |
---|---|---|
System.ReadOnlyMemory<System.Byte> | pin |
Returns
A boolean, true
if the PIN is verified, false
otherwise.
Exceptions
Type | Condition |
---|---|
System.Security.SecurityException | The PIN is blocked. |
System.NotSupportedException | The YubiKey is not version 4 FIPS series. |
Remarks
See the documentation for VerifyPin() for more information on verifying a PIN.