RSAOpenSsl.Encrypt(Byte[], RSAEncryptionPadding) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Encrypts the input data using the specified padding mode.
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
or padding
is null
.
padding
is unknown, or not supported by this implementation.
-or-
The length of data
is too long for the combination of KeySize and the selected padding.
-or-
The encryption operation failed.
Applies to
See also
التعاون معنا على GitHub
يمكن العثور على مصدر هذا المحتوى على GitHub حيث يمكنك أيضاً إضافة مشاكل وطلبات سحب ومراجعتها. للحصول على معلومات إضافية، اطلع على دليل المساهم لدينا.