Table of Contents

Class UpdateSlot

Namespace
Yubico.YubiKey.Otp.Operations
Assembly
Yubico.YubiKey.dll

Class for updating an existing OTP slot configuration.

public class UpdateSlot : OperationBase<UpdateSlot>
Inheritance
object
UpdateSlot
Inherited Members

Methods

ExecuteOperation()

Execute the operation here.

protected override void ExecuteOperation()

Remarks

This method is called after pre-launch code has run. Everything that could be validated should have been before this method is called.

The only validation could that should be in this method are things that could not be checked in the PreLaunchOperation() method. For example, if an operation must be completed in multiple steps, and subsequent steps depend on the success of previous steps, then it must be in this method by necessity.

ProtectLongPressSlot(bool)

Locks and/or protects the long press configuration slot of the YubiKey.

public UpdateSlot ProtectLongPressSlot(bool setConfig = true)

Parameters

setConfig bool

Returns

UpdateSlot

The current UpdateSlot instance.

SetAllowUpdate(bool)

Allows certain non-security related settings to be modified after the configuration has been written.

public UpdateSlot SetAllowUpdate(bool setConfig)

Parameters

setConfig bool

Returns

UpdateSlot

The current UpdateSlot instance.

Remarks

The list below is of all settings that can be updated when this setting is set. However, some of the options are not compatible with all settings, so it's important to use care when choosing settings to apply later.

SetAppendCarriageReturn(bool)

Sends a carriage return [Enter Key] after all characters have been sent.

public UpdateSlot SetAppendCarriageReturn(bool setConfig)

Parameters

setConfig bool

Returns

UpdateSlot

The current UpdateSlot instance.

SetAppendDelayToFixed(bool)

Adds a 500ms delay after sending the fixed string.

public UpdateSlot SetAppendDelayToFixed(bool setConfig)

Parameters

setConfig bool

Returns

UpdateSlot

The current UpdateSlot instance.

SetAppendDelayToOtp(bool)

Adds a 500ms delay after sending the OTP string.

public UpdateSlot SetAppendDelayToOtp(bool setConfig)

Parameters

setConfig bool

Returns

UpdateSlot

The current UpdateSlot instance.

SetAppendTabToFixed(bool)

Sends a tab character after the fixed string.

public UpdateSlot SetAppendTabToFixed(bool setConfig)

Parameters

setConfig bool

Returns

UpdateSlot

The current UpdateSlot instance.

SetAppendTabToOtp(bool)

Sends a tab character after the OTP string.

public UpdateSlot SetAppendTabToOtp(bool setConfig)

Parameters

setConfig bool

Returns

UpdateSlot

The current UpdateSlot instance.

SetDormant(bool)

Allows a configuration to be stored without being accessible.

public UpdateSlot SetDormant(bool setConfig)

Parameters

setConfig bool

Returns

UpdateSlot

The current UpdateSlot instance.

SetFastTrigger(bool)

Causes the trigger action of the YubiKey button to become faster.

public UpdateSlot SetFastTrigger(bool setConfig)

Parameters

setConfig bool

Returns

UpdateSlot

The current UpdateSlot instance.

Remarks

This only applies when one configuration is written. If both configurations are active, this setting has no effect.

SetInvertLed(bool)

Inverts the configured state of the LED.

public UpdateSlot SetInvertLed(bool setConfig)

Parameters

setConfig bool

Returns

UpdateSlot

The current UpdateSlot instance.

SetSendTabFirst(bool)

Sends a tab character before the fixed string.

public UpdateSlot SetSendTabFirst(bool setConfig)

Parameters

setConfig bool

Returns

UpdateSlot

The current UpdateSlot instance.

SetSerialNumberApiVisible(bool)

Allows the serial number to be read by proprietary means, including being visible to the Yubico.YubiKey SDK.

public UpdateSlot SetSerialNumberApiVisible(bool setConfig)

Parameters

setConfig bool

Returns

UpdateSlot

The current UpdateSlot instance.

Remarks

This is a device wide setting. If it is set in either configurable slot, it is considered enabled by the device.

SetSerialNumberButtonVisible(bool)

Allows the serial number to be retrieved by holding down the touch button while inserting the device into the USB port.

public UpdateSlot SetSerialNumberButtonVisible(bool setConfig)

Parameters

setConfig bool

Returns

UpdateSlot

The current UpdateSlot instance.

Remarks

Once the LED starts to flash, release the button and the serial number will then be sent as a string of digits.

This is a device wide setting. If it is set in either configurable slot, it is considered enabled by the device.

SetSerialNumberUsbVisible(bool)

Makes the serial number appear in the YubiKey's USB descriptor's iSerialNumber field.

public UpdateSlot SetSerialNumberUsbVisible(bool setConfig)

Parameters

setConfig bool

Returns

UpdateSlot

The current UpdateSlot instance.

Remarks

This makes each device unique from the host computer's view.

This is a device wide setting. If it is set in either configurable slot, it is considered enabled by the device.

SetUse10msPacing(bool)

Adds an inter-character pacing time of 10ms between each keystroke.

public UpdateSlot SetUse10msPacing(bool setConfig)

Parameters

setConfig bool

Returns

UpdateSlot

The current UpdateSlot instance.

Remarks

SetUse20msPacing(bool)

Adds an inter-character pacing time of 20ms between each keystroke.

public UpdateSlot SetUse20msPacing(bool setConfig)

Parameters

setConfig bool

Returns

UpdateSlot

The current UpdateSlot instance.

Remarks

SetUseNumericKeypad(bool)

Causes numeric characters to be sent as keystrokes from the numeric keypad rather than the normal numeric keys on an 84-key keyboard.

public UpdateSlot SetUseNumericKeypad(bool setConfig)

Parameters

setConfig bool

Returns

UpdateSlot

The current UpdateSlot instance.