Пример #1
0
 /// <summary>
 /// 设置使用DES加密后的Cookie
 /// </summary>
 /// <param name="key"></param>
 /// <param name="valueString"></param>
 public static void SetEncryptedCookie(String key, String valueString)
 {
     key         = EncryptString.Encrypt(key);
     valueString = EncryptString.Encrypt(valueString);
     SetCookie(key, valueString);
 }
Пример #2
0
 /// <summary>
 /// 设置使用DES加密后的Cookie,并设置Cookie的有效时间
 /// </summary>
 /// <param name="key"></param>
 /// <param name="valueString"></param>
 /// <param name="expires"></param>
 public static void SetEncryptedCookie(String key, String valueString, DateTime expires)
 {
     key         = EncryptString.Encrypt(key);
     valueString = EncryptString.Encrypt(valueString);
     SetCookie(key, valueString, expires);
 }
Пример #3
0
 /// <summary>
 /// 设置使用TripleDES加密后的Cookie
 /// </summary>
 /// <param name="key"></param>
 /// <param name="valueString"></param>
 public static void SetTripleDESEncryptedCookie(String key, String valueString)
 {
     key         = EncryptString.EncryptTripleDES(key);
     valueString = EncryptString.EncryptTripleDES(valueString);
     SetCookie(key, valueString);
 }