/// <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); }
/// <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); }
/// <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); }