TryGetYubiKey Method
TryGetYubiKey(int, 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 |
---|---|---|
int | serialNumber | Integer representation of the YubiKey serial number. |
IYubiKeyDevice | yubiKey | Out parameter that returns an IYubiKeyDevice instance. |
Returns
bool
A bool indicating whether the YubiKey was found.
Remarks
This method will only be successful if the YubiKey was programmed with the flag
SerialNumberUsbVisible
.