public static String GetEncryptedCookieValue(String key) { //获取使用DES解密后的Cookie key = EncryptString.Encrypt(key); String valueString = GetCookieValue(key); valueString = EncryptString.Decrypt(valueString); return(valueString); }
public static void SetEncryptedCookie(String key, String valueString, DateTime expires) { //设置使用DES加密后的Cookie,并设置Cookie的有效时间 key = EncryptString.Encrypt(key); valueString = EncryptString.Encrypt(valueString); SetCookie(key, valueString, expires); }
public static void SetEncryptedCookie(String key, String valueString) { //设置使用DES加密后的Cookie key = EncryptString.Encrypt(key); valueString = EncryptString.Encrypt(valueString); SetCookie(key, valueString); }