RSA.Decrypt(Byte[], RSAEncryptionPadding) 方法

定義

使用指定的填補模式在衍生類別中覆寫,解密輸入的資料。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:
 abstract 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);
public abstract 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[]
abstract member Decrypt : byte[] * System.Security.Cryptography.RSAEncryptionPadding -> byte[]
Public Overridable Function Decrypt (data As Byte(), padding As RSAEncryptionPadding) As Byte()
Public MustOverride Function Decrypt (data As Byte(), padding As RSAEncryptionPadding) As Byte()

參數

data
Byte[]

要解密的資料。The data to decrypt.

padding
RSAEncryptionPadding

填補模式。The padding mode.

傳回

Byte[]

已解密的資料。The decrypted data.

例外狀況

datapaddingnulldata or padding is null.

衍生的類別必須覆寫這個方法。A derived class must override this method.

padding 未知,或不支援此實作。padding is unknown, or not supported by this implementation.

-或--or-

data 的長度不等於 KeySize 的位元組數目。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.

適用於

另請參閱