Exemple #1
0
 /// <summary>
 /// Encrypt some text using AES encryption and a password key.
 /// </summary>
 /// <param name="plaintext">The text to encrypt.</param>
 /// <param name="key">The password key for the encryption.</param>
 /// <returns>The encrypted text (cipher).</returns>
 public static string Encrypt(string plaintext, string key)
 {
     return(AESProvider.EncryptString(plaintext, key));
 }
Exemple #2
0
 /// <summary>
 ///     Encrypt some text using AES encryption and a password.
 /// </summary>
 /// <param name="plaintext">The text to encrypt.</param>
 /// <param name="password">The password for the encryption.</param>
 /// <returns>The encrypted text (ciphertext).</returns>
 public static string Encrypt(string plaintext, string password)
 {
     return(AESCryptoProvider.EncryptString(plaintext, password));
 }