CryptoStringExtensions..::..Decrypt Method (String, X509Certificate2, RSAEncryptionPadding)
Decrypts the specified certificate.
Namespace:
SystemAssembly: Walter.Cypher (in Walter.Cypher.dll)
Syntax
[NotNullAttribute] public static string Decrypt( this string text, X509Certificate2 certificate, RSAEncryptionPadding padding )
Parameters
- text
- Type: String
The text.
- certificate
- Type: X509Certificate2
The certificate.
- padding
- Type: RSAEncryptionPadding
The padding.
Return Value
UTF8 string clear textExceptions
| Exception | Condition |
|---|---|
| ArgumentException | '{nameof(text)}' cannot be null or empty. - text |
| ArgumentException | '{nameof(text)}' is not base 64 encoded probably not valid. - text |
| ArgumentNullException | certificate |
| ArgumentNullException | padding |
| CryptographicException | certificate {certificate.FriendlyName} doesn't have a private key |

