Click or drag to resize

RSACryptoServiceProviderEncrypt Method

Encrypts data with the Crestron.SimplSharp.Cryptography.RSA algorithm.

Namespace: Crestron.SimplSharp.Cryptography
Assembly: SimplSharpCryptographyInterface (in SimplSharpCryptographyInterface.dll) Version: 2.21.121
Syntax
C#
public byte[] Encrypt(
	byte[] rgb,
	bool fOAEP
)

Parameters

rgb  Byte
The data to be encrypted.
fOAEP  Boolean
true to perform direct Crestron.SimplSharp.Cryptography.RSA encryption using OAEP padding (only available on a computer running Microsoft Windows XP or later); otherwise, false to use PKCS#1 v1.5 padding.

Return Value

Byte
The encrypted data.
Exceptions
ExceptionCondition
CryptographicException The cryptographic service provider (CSP) cannot be acquired. -or- The length of the rgb parameter is greater than the maximum allowed length. -or- The fOAEP parameter is true and OAEP padding is not supported.
ArgumentNullExceptionrgb is null.

Version Information

.NET

Supported in: 6.0

.NET Compact Framework

Supported in: 3.5
See Also