public static void SetEncryptedCookie(String key
{ //設置使用DES加密後的Cookie
key = EncryptString
valueString = EncryptString
SetCookie(key
}
public static void SetEncryptedCookie(String key
String valueString
{ //設置使用DES加密後的Cookie
key = EncryptString
valueString = EncryptString
SetCookie(key
}
public static String GetTripleDESEncryptedCookieValue(String key)
{ //獲取使用TripleDES解密後的Cookie
key = EncryptString
String valueString = GetCookieValue(key);
valueString = EncryptString
return(valueString);
}
public static String GetEncryptedCookieValue(String key)
{ //獲取使用DES解密後的Cookie
key = EncryptString
String valueString = GetCookieValue(key);
valueString = EncryptString
return(valueString);
}
public static HttpCookie GetCookie(String key)
{ //通過關鍵字獲取Cookie
key = HttpContext
return(HttpContext
}
public static String GetCookieValue(String key)
{ //通過關鍵字獲取Cookie的value
String valueString = GetCookie(key)
valueString = HttpContext
return(valueString);
}
}
把應用程序Example_
頁面EncryptCookies
<asp:Label ID=
<asp:Label ID=
<asp:Label ID=
[
From:http://tw.wingwit.com/Article/program/net/201311/15123.html