Editare

Partajați prin


RSACng.Encrypt(Byte[], RSAEncryptionPadding) Method

Definition

Encrypts the input data using the specified padding.

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

Parameters

data
Byte[]

The data to encrypt.

padding
RSAEncryptionPadding

The padding mode.

Returns

Byte[]

The encrypted data.

Exceptions

data is null.

-or-

padding is null.

padding.Mode isn't equal to Pkcs1 or Oaep.

Applies to