示例#1
0
 /// <summary>
 /// Decrypts specified ciphertext using Rijndael symmetric key algorithm.
 /// </summary>
 /// <param name="sCipherText">The encoded cipher text to decrypt.</param>
 /// <returns>Decrypted string value.</returns>
 /// <remarks>
 /// </remarks>
 internal static string DecryptString(string sCipherText, string sPassword)
 {
     return(RijndaelSymmetricCipher.Decrypt(sCipherText, sPassPhrase + sPassword, sPassword + sSaltValue, sHashAlgorithm, iPasswordIterations, sInitVector, iKeySize));
 }
示例#2
0
 /// <summary>
 /// Encrypts specified plaintext using Rijndael symmetric key algorithm
 /// and returns a base64-encoded result.
 /// </summary>
 /// <param name="sPlainText">The plain text to encode.</param>
 /// <returns>
 /// </returns>
 internal static string EncryptString(string sPlainText, string sNewPassPhrase, string sNewSaltValue)
 {
     return(RijndaelSymmetricCipher.Encrypt(sPlainText, sNewPassPhrase, sNewSaltValue, sHashAlgorithm, iPasswordIterations, sInitVector, iKeySize));
 }