CryptographyDecryptAsync(String, String, Boolean, CancellationToken) Method
Decrypts a ciphertext using the default symmetric algorithm.
Namespace: InnerDrive.CoreAssembly: InnerDrive.Core (in InnerDrive.Core.dll) Version: 5.2.9417.0
public static Task<string> DecryptAsync(
string cipherText,
string key,
bool hasSalt,
CancellationToken cancellationToken = default
)
- cipherText String
- The encrypted text to decrypt.
- key String
- The key to decrypt the ciphertext.
- hasSalt Boolean
- If true, the ciphertext is assumed to contain a
salt string. See RemoveSalt(String)
- cancellationToken CancellationToken (Optional)
- A CancellationToken
controlling the request lifetime
TaskStringA
String containing the decrypted plaintext
Uses the default encryption algorithm,
DES.
The ciphertext can be any length other than 0;
the key length must be at least MinKeyLength bytes long and no more than
MaxKeyLength bytes long.
Adapted from work by Frank
Fong and William Rawls of the Code Project.