TryGetYubiKey Method
TryGetYubiKey(Int32, out IYubiKeyDevice)
Get info on a specific YubiKey by serial number.
C#
public static bool TryGetYubiKey(int serialNumber, out IYubiKeyDevice yubiKey)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | serialNumber | Integer representation of the YubiKey serial number. |
IYubiKeyDevice | yubiKey | Out parameter that returns an IYubiKeyDevice instance. |
Returns
System.Boolean
A bool indicating whether the YubiKey was found.
Remarks
This method will only be successful if the YubiKey was programmed with the flag
SerialNumberUsbVisible
.