SetManagementKeyCommand Constructor

SetManagementKeyCommand(ReadOnlyMemory<Byte>)

Initializes a new instance of the SetManagementKeyCommand class. This command takes the new management key as input and will set the TouchPolicy and Algorithm properties to their respective defaults.

C#
public SetManagementKeyCommand(ReadOnlyMemory<byte> newKey)

Parameters

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

The bytes that make up the new management key.

Remarks

This constructor is provided for those developers who want to use the object initializer pattern. For example:

  var command = new SetManagementKeyCommand(keyData)
  {
      TouchPolicy = PivTouchPolicy.Cached,
      Algorithm = PivAlgorithm.AES192,
  };

The default algorithm is TripleDes. If you do not set the Algorithm property after instantiating with this constructor, the SDK will expect the key to be TripleDES. Valid algorithms are PivAlgorithm.TripleDes, PivAlgorithm.Aes128, PivAlgorithm.Aes192, and PivAlgorithm.Aes256.

Note that you need to authenticate the current PIV management key before setting it to a new value with this command.

SetManagementKeyCommand(ReadOnlyMemory<Byte>, PivTouchPolicy)

Initializes a new instance of the SetManagementKeyCommand class. This command takes the new management key and the touch policy as input.

C#
public SetManagementKeyCommand(ReadOnlyMemory<byte> newKey, PivTouchPolicy touchPolicy)

Parameters

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

The bytes that make up the new management key.

PivTouchPolicy touchPolicy

The touch policy for the management key.

Remarks

Note that a touchPolicy of PivTouchPolicy.Default or None is equivalent to Never.

The default algorithm is TripleDes. If you do not set the Algorithm property after instantiating with this constructor, the SDK will expect the key to be TripleDES. Valid algorithms are PivAlgorithm.TripleDes, PivAlgorithm.Aes128, PivAlgorithm.Aes192, and PivAlgorithm.Aes256.

Note also that you need to authenticate the current PIV management key before setting it to a new value with this command.

SetManagementKeyCommand(ReadOnlyMemory<Byte>, PivTouchPolicy, PivAlgorithm)

Initializes a new instance of the SetManagementKeyCommand class. This command takes the new management key, the touch policy, and the algorithm as input.

C#
public SetManagementKeyCommand(ReadOnlyMemory<byte> newKey, PivTouchPolicy touchPolicy, PivAlgorithm algorithm)

Parameters

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

The bytes that make up the new management key.

PivTouchPolicy touchPolicy

The touch policy for the management key.

PivAlgorithm algorithm

The algorithm of the new management key.

Remarks

Note that a touchPolicy of PivTouchPolicy.Default or None is equivalent to Never.

Valid algorithms are PivAlgorithm.TripleDes, PivAlgorithm.Aes128, PivAlgorithm.Aes192, and PivAlgorithm.Aes256,

Note also that you need to authenticate the current PIV management key before setting it to a new value with this command.

Generated by DocFX