AuthenticateDecryptCommand Constructor
AuthenticateDecryptCommand(ReadOnlyMemory<Byte>, Byte)
Initializes a new instance of the AuthenticateDecryptCommand class. This command takes the slot number and the data to decrypt.
C#
public AuthenticateDecryptCommand(ReadOnlyMemory<byte> dataToDecrypt, byte slotNumber)
Parameters
Type | Name | Description |
---|---|---|
System.ReadOnlyMemory<System.Byte> | dataToDecrypt | The data to decrypt. |
System.Byte | slotNumber | The slot holding the private key to use. |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | The ciphertext is not the correct length. |
Remarks
The slot number must be for a slot that holds an RSA private key. It
cannot be F9
(the attestation key).
If the key that will be used to decrypt is RSA-1024, then the data to decrypt must be 128 (1024 bits) bytes long. If the key is RSA-2048, then the data must be 256 bytes (2048 bits) long. See also the User's Manual entry on decrypting in the PIV commands page.