SetManagementKey Method

SetManagementKey(ReadOnlyMemory<Byte>)

Set the ManagementKey property with the specified value.

C#
public void SetManagementKey(ReadOnlyMemory<byte> managementKey)

Parameters

Type Name Description
System.ReadOnlyMemory<System.Byte> managementKey

Exceptions

Type Condition
System.ArgumentException

The data Length is not 0, 16, 24, or 32 bytes.

Remarks

The caller supplies an argument of Length zero, 16, 24, or 32. Any other input will cause an exception.

An empty array (Length = zero) means there is no management key stored in the PRINTED object on the given YubiKey. A caller can set the management key to empty in order to "convert" a YubiKey from PIN-protected to normal (the application/user must supply the management key for authentication).

If there is a management key already in this object, this method will overwrite it.

This method will copy the data, it will not copy a reference.

Generated by DocFX