RSACng::Encrypt Method (array<Byte>^, RSAEncryptionPadding^)

 

Encrypts the input data using the specified padding.

Namespace:   System.Security.Cryptography
Assembly:  System.Core (in System.Core.dll)

public:
virtual array<unsigned char>^ Encrypt(
	array<unsigned char>^ data,
	RSAEncryptionPadding^ padding
) override

Parameters

data
Type: array<System::Byte>^

The data to encrypt.

padding
Type: System.Security.Cryptography::RSAEncryptionPadding^

The padding mode.

Return Value

Type: array<System::Byte>^

Returns Byte .

Exception Condition
ArgumentNullException

data is null.

-or-

padding is null.

CryptographicException

.NET Framework
Available since 4.6
Return to top
Show: