CryptographyEncryptAsync(String, String, String) Method
Encrypts a string using a specified symmetrical encryption algorithm.
Namespace: InnerDrive.CoreAssembly: InnerDrive.Core (in InnerDrive.Core.dll) Version: 5.2.9017.0
public static Task<string> EncryptAsync(
string plainText,
string key,
string providerName
)
- plainText String
- The string to encrypt.
- key String
- The key to encrypt the plaintext.
- providerName String
- The type name of any symmetric cryptography provider derived from
SymmetricAlgorithm that will perform the encryption.
TaskStringA Base64-encoded
String containing the ciphertext.
The default encryption 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.