RSA.Decrypt(Byte[], RSAEncryptionPadding) Method

Definition

When overridden in a derived class, decrypts the input data using the specified padding mode.

public:
 virtual cli::array <System::Byte> ^ Decrypt(cli::array <System::Byte> ^ data, System::Security::Cryptography::RSAEncryptionPadding ^ padding);
public virtual byte[] Decrypt (byte[] data, System.Security.Cryptography.RSAEncryptionPadding padding);
abstract member Decrypt : byte[] * System.Security.Cryptography.RSAEncryptionPadding -> byte[]
override this.Decrypt : byte[] * System.Security.Cryptography.RSAEncryptionPadding -> byte[]
Public Overridable Function Decrypt (data As Byte(), padding As RSAEncryptionPadding) As Byte()

Parameters

data
Byte[]

The data to decrypt.

padding
RSAEncryptionPadding

The padding mode.

Returns

Byte[]

The decrypted data.

Exceptions

data or padding is null.

A derived class must override this method.

padding is unknown, or not supported by this implementation.

-or-

The length of data is not equal to the number of bytes for KeySize.

-or-

This instance represents only a public key.

-or-

The decryption operation failed.

Applies to

See also