Appearance
Decrypt Method
Definition
- Namespace:
JASE.Crypto - Assembly:
JASE.Crypto.dll
Overloads
| Name | Description |
|---|---|
byte[] Decrypt(byte[] input, byte[] key, RsaPadding padding = null) | Decrypts the specified data using an RSA private key provided as a byte array. |
byte[] Decrypt(byte[] input, string keyInXml, RsaPadding padding = null) | Decrypts the specified data using an RSA private key provided in XML format. |
byte[] Decrypt(byte[] input, X509Certificate2 certificate, RsaPadding padding = null, bool allowInvalidTime = null) | Decrypts the input data using the private key of the specified X.509 certificate. |
byte[] Decrypt(byte[] input, byte[] key, RsaPadding padding = null)
csharp
byte[] Decrypt(byte[] input, byte[] key, RsaPadding padding = null)Decrypts the specified data using an RSA private key provided as a byte array.
Parameters
| Name | Description |
|---|---|
input | The encrypted input data as a byte array. |
key | The RSA private key in raw byte array format. |
padding | The RSA padding scheme to use. Default is OaepSHA256. |
Returns
The decrypted byte array.
byte[] Decrypt(byte[] input, X509Certificate2 certificate, RsaPadding padding = null, bool allowInvalidTime = null)
csharp
byte[] Decrypt(byte[] input, X509Certificate2 certificate, RsaPadding padding = null, bool allowInvalidTime = null)Decrypts the input data using the private key of the specified X.509 certificate.
Parameters
| Name | Description |
|---|---|
allowInvalidTime | Boolean to enforce certificate time frame validity |
certificate | The X.509 certificate containing the private key used for decryption. |
input | The input data to decrypt. |
padding | The RSA padding scheme to use. Default is OaepSHA256. |
Returns
The decrypted data.
byte[] Decrypt(byte[] input, string keyInXml, RsaPadding padding = null)
csharp
byte[] Decrypt(byte[] input, string keyInXml, RsaPadding padding = null)Decrypts the specified data using an RSA private key provided in XML format.
Parameters
| Name | Description |
|---|---|
input | The encrypted input data as a byte array. |
keyInXml | The RSA private key in XML format. Must be a valid XML string. |
padding | The RSA padding scheme to use. Default is OaepSHA256. |
Returns
The decrypted byte array.