LicenseSpring .Net SDK 7.40.0
Easily add Software Licensing to your application
Loading...
Searching...
No Matches
LicenseSpring.HardwareKeyOptions Class Reference

Class for managing Hardware Key (YubiKey PIV) specific options. More...

Public Member Functions

 HardwareKeyOptions (string targetSerial, string pin)
 Constructor for the HardwareKeyOptions class.
 

Static Public Member Functions

static List< string > ListAvailableKeys ()
 Lists the serial numbers of all connected YubiKeys with PIV support.
 

Properties

string Pin [get, set]
 UTF-8 PIN required to access the PIV functions on the target YubiKey.
 
string TargetSerial [get, set]
 Serial number of the target YubiKey to be used for signing. It should match one returned by ListAvailableKeys
 

Detailed Description

Class for managing Hardware Key (YubiKey PIV) specific options.

Allows discovering available keys, selecting a target key by serial, and setting the required PIN. This object should be configured and then passed to ExtendedOptions.

Constructor & Destructor Documentation

◆ HardwareKeyOptions()

LicenseSpring.HardwareKeyOptions.HardwareKeyOptions ( string  targetSerial,
string  pin 
)

Constructor for the HardwareKeyOptions class.

Parameters
targetSerialTargeted hardware key serial number. Get list of available hardware keys by calling HardwareKeyOptions.ListAvailableKeys() static method.
pinUTF-8 PIN required to access the PIV functions on the target YubiKey.
Exceptions
ArgumentException

Member Function Documentation

◆ ListAvailableKeys()

static List< string > LicenseSpring.HardwareKeyOptions.ListAvailableKeys ( )
static

Lists the serial numbers of all connected YubiKeys with PIV support.

Returns
An array of unique YubiKey serial numbers. Returns an empty array if no devices are found or an error occurs.

The documentation for this class was generated from the following file: