WALTER | Workable Algorithms for Location-aware Transmission, Encryption Response

CryptoStringExtensions..::..Decrypt Method (String, X509Certificate2, RSAEncryptionPadding)

Decrypts the specified certificate.

Namespace:  System
Assembly:  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 text

Exceptions


ExceptionCondition
ArgumentException'{nameof(text)}' cannot be null or empty. - text
ArgumentException'{nameof(text)}' is not base 64 encoded probably not valid. - text
ArgumentNullExceptioncertificate
ArgumentNullExceptionpadding
CryptographicExceptioncertificate {certificate.FriendlyName} doesn't have a private key