RSACryptoServiceProviderEncrypt Method |
Encrypts data with the Crestron.SimplSharp.Cryptography.RSA algorithm.
Namespace: Crestron.SimplSharp.CryptographyAssembly: SimplSharpCryptographyInterface (in SimplSharpCryptographyInterface.dll) Version: 2.21.121
Syntaxpublic 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
ByteThe encrypted data.
Exceptions| Exception | Condition |
|---|
| 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.
|
| ArgumentNullException | rgb is null. |
Version Information
.NET
Supported in: 6.0
.NET Compact Framework
Supported in: 3.5
See Also