CryptographyHelperDecryptT(T, String, String, String, Encoding) Method

Decrypts a base64 string using the specified symmetric algorithm returning a string.

Definition

Namespace: CoreMX.NET.Helpers
Assembly: CoreMX.NET (in CoreMX.NET.dll) Version: 1.0.0+7eb54d7f3459576d25646e9f286fb1fe49eac8a5
C#
public static string Decrypt<T>(
	this T encryptor,
	string cipher,
	string key,
	string iv,
	Encoding? encoding = null
)
where T : SymmetricAlgorithm

Parameters

encryptor  T
The Instance of the Algorithm
cipher  String
The Cipher Text to decrypt
key  String
The Key to decrypt
iv  String
The IV to decrypt
encoding  Encoding  (Optional)
Encoding (Default UTF8)

Type Parameters

T
The Type of the SymmetricAlgorithm

Return Value

String

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type T. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

See Also