Exemplo n.º 1
0
 /// <summary>
 /// Decrypt an AES encrypted cipher (previously encrypted) using a password key.
 /// </summary>
 /// <param name="cipher">The encrypted text (cipher).</param>
 /// <param name="password">The password key for the encryption.</param>
 /// <returns>The original unencrypted text or "" if password and cipher don't match.</returns>
 public static string Decrypt(string cipher, string password)
 {
     return(AESProvider.DecryptString(cipher, password));
 }
Exemplo n.º 2
0
 /// <summary>
 ///     Decrypt an AES encrypted ciphertext (previously encrypted with the Encrypt method) using a password.
 /// </summary>
 /// <param name="ciphertext">The encrypted text (ciphertext).</param>
 /// <param name="password">The password for the encryption.</param>
 /// <returns>The original unencrypted text or "" if password and ciphertext don't match.</returns>
 public static string Decrypt(string ciphertext, string password)
 {
     return(AESCryptoProvider.DecryptString(ciphertext, password));
 }