Share via


RSAKeyVault.Encrypt(Byte[], RSAEncryptionPadding) Method

Definition

Encrypts the input data using the specified padding mode.

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

The padding is not supported.

The server returned an error. See Message for details returned from the server.

Applies to