public static Task<string> EncryptAsync(
string plainText,
string key,
SymmetricAlgorithm provider
)
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.
ArgumentNullException | Thrown if plainText, or key, or provider is null. |
ArgumentException | Thrown if plainText or key is Empty. |