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

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

Decrypts the specified certificate.

Namespace:  System
Assembly:  Walter.Cypher (in Walter.Cypher.dll)

Syntax


public static string Decrypt(
	this string text,
	X509Certificate2 certificate
)

Parameters

text
Type: String
The text.
certificate
Type: X509Certificate2
The certificate.

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 is not provided
CryptographicExceptioncertificate {certificate.FriendlyName} doesn't have a private key