Show / Hide Table of Contents

SetDeviceFlags Method

SetDeviceFlags(DeviceFlags)

Modifies the value of DeviceFlags.

C#
public void SetDeviceFlags(DeviceFlags deviceFlags)

Parameters

Type Name Description
DeviceFlags deviceFlags

The desired device settings. A set flag means that the setting is enabled. Otherwise, the capability is disabled.

Implements

IYubiKeyDevice.SetDeviceFlags(DeviceFlags)

Exceptions

Type Condition
InvalidOperationException

The command failed to complete.

NotSupportedException

An error occurred when attempting to connect to the device.

Remarks

YubiKeys prior to firmware version 5 can use SetLegacyDeviceConfiguration(YubiKeyCapabilities, byte, bool, int) to enable TouchEject.

This operation requires the YubiKey's configuration to be unlocked (see ConfigurationLocked and UnlockConfiguration(ReadOnlySpan<byte>).

See Also

SetDeviceInfoCommand
In this article
Back to top Generated by DocFX