/// <summary> /// Decrypts specified ciphertext using Rijndael symmetric key algorithm. /// </summary> /// <param name="cipherText">The text to decrypt</param> /// <param name="passPhrase">The pass phrase used for this encryption</param> /// <param name="saltValue">The salt value used for this encryption</param> /// <param name="initVector">The init vector used for this encryption (must be 16 bit)</param> /// <param name="hashAlgorithm">The hash algorithm used for this encryption</param> /// <param name="keySize">The size of the key used for this encryption.</param> /// <param name="passWordIterations"> /// Number of iterations used to generate password. One or two iterations /// should be enough.</param> /// <returns></returns> public static string AES_Simple_Decrypt(string cipherText, string passPhrase, string saltValue , string initVector, RijndaelSimpleHashAlgorithm hashAlgorithm, RijndaelSimpleKeySize keySize, int passWordIterations) { return(RijndaelSimple.Decrypt(cipherText, passPhrase, saltValue, hashAlgorithm.ToString(), passWordIterations, initVector, (int)keySize)); }
/// <summary> /// /// </summary> /// <param name="pTextToDecrypt"></param> /// <param name="pPassPhrase"></param> /// <param name="pInitVector"></param> /// <param name="pSaltValue"></param> /// <returns></returns> public static string AES_Simple_Decrypt(string pTextToDecrypt, string pPassPhrase, string pInitVector, string pSaltValue) { return(RijndaelSimple.Decrypt(pTextToDecrypt, pPassPhrase, pSaltValue, pInitVector)); }