Example #1
0
 /// <summary>
 /// 解密字符串
 /// </summary>
 /// <param name="strSource">要解密的字符串</param>
 /// <returns>解密后的字符串</returns>
 public static string Decrypt(string strSource, int type)
 {
     try
     {
         EncryptCore encryptCore = new EncryptCore();
         if (type == 1)
         {
             return(encryptCore.Decrypt(strSource, EncryptKey, EncryptIV));
         }
         else if (type == 2)
         {
             return(encryptCore.Decrypt(strSource, SSOTicketKey, SSOTicketIV));
         }
     }
     catch
     {
         return("");
     }
     return("");
 }
Example #2
0
 /// <summary>
 /// 解密字符串
 /// </summary>
 /// <param name="strSource"></param>
 /// <returns></returns>
 public static string Decrypt(string strSource)
 {
     try
     {
         EncryptCore encryptCore = new EncryptCore();
         return(encryptCore.Decrypt(strSource, EncryptKey, EncryptIV));
     }
     catch
     {
         return("");
     }
 }
Example #3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        public static Hashtable GetHashtable(string request)
        {
            EncryptCore encryptCore = new EncryptCore();
            string      strDecrypt  = encryptCore.Decrypt(request, EncryptHelper.EncryptKey, EncryptHelper.EncryptIV);

            string[]  arrArgs     = strDecrypt.Split('&');
            Hashtable _QueryTable = new Hashtable();

            for (int i = 0; i < arrArgs.Length; i++)
            {
                string[] arrKeyValue = arrArgs[i].Split('=');
                if (arrKeyValue == null || arrKeyValue.Length != 2)
                {
                    continue;
                }
                _QueryTable.Add(arrKeyValue[0], System.Web.HttpUtility.UrlDecode(arrKeyValue[1]));
            }
            return(_QueryTable);
        }