public static string Decrypt(string input, string passphrase, string IVString)
{
var provider = new RijndaelManaged();
var hashMD5 = new MD5CryptoServiceProvider();
byte[] key = hashMD5.ComputeHash(System.Text.ASCIIEncoding.ASCII.GetBytes(passphrase));
byte[] IV = hashMD5.ComputeHash(System.Text.ASCIIEncoding.ASCII.GetBytes(IVString));
provider.Mode = CMode;
byte[] inputbytes = HttpServerUtility.UrlTokenDecode(input); //Convert.FromBase64String(input);
var ms = new MemoryStream();
var cs = new CryptoStream(ms, provider.CreateDecryptor(key, IV), CryptoStreamMode.Write);
cs.Write(inputbytes, 0, inputbytes.Length);
cs.FlushFinalBlock();
ms.Position = 0;
string res = new StreamReader(ms).ReadToEnd();
return res;
}