SetNewAccessCode Method
SetNewAccessCode(SlotAccessCode)
Set the new access code the YubiKey slot will be programmed with.
C#
public T SetNewAccessCode(SlotAccessCode code)
Parameters
Type | Name | Description |
---|---|---|
SlotAccessCode | code | The SlotAccessCode to use. |
Returns
T
The ConfigureStaticPassword instance
Exceptions
Type | Condition |
---|---|
System.ArgumentException | Thrown if the access code is longer than MaxAccessCodeLength. |
Remarks
There are two access code methods - UseCurrentAccessCode(SlotAccessCode) and SetNewAccessCode(SlotAccessCode). If the YubiKey slot is currently protected by an access code, it must be specified when you call UseCurrentAccessCode(SlotAccessCode). If you wish to retain the same access code, it must also be specified to SetNewAccessCode(SlotAccessCode). If you do not specify it as the new access code, then the slot will have its protection removed and have no access code.