Click or drag to resize

CryptographyDecrypt(String, String, String) Method

Decrypts a ciphertext using a specific symmetric algorithm.

Namespace: InnerDrive.Core
Assembly: InnerDrive.Core (in InnerDrive.Core.dll) Version: 5.0.8475.0
Syntax
C#
public static Task<string> Decrypt(
	string cipherText,
	string key,
	string providerName
)

Parameters

cipherText  String
The encrypted text to decrypt.
key  String
The key to decrypt the ciphertext.
providerName  String
The type name of any symmetric cryptography provider derived from SymmetricAlgorithm that will perform the decryption.

Return Value

TaskString
A String containing the decrypted plaintext.
Remarks

The default decryption algorithm is DES. Any other class derived from SymmetricAlgorithm can be used instead.

Adapted from work by Frank Fong and William Rawls of the Code Project.

The cipher text can be any length other than 0; the key length must be at least MinKeyLength bytes long and no more than MaxKeyLength bytes long.

See Also