Rolosoft Documented Class Library
Decode Method (cookie)
NamespacesRolosoft.WebControlsCookieSecureDecode(HttpCookie)
Decodes a cookie from definable protection level.
Declaration Syntax
C#Visual BasicVisual C++
public static HttpCookie Decode(
	HttpCookie cookie
)
Public Shared Function Decode ( _
	cookie As HttpCookie _
) As HttpCookie
public:
static HttpCookie^ Decode(
	HttpCookie^ cookie
)
Parameters
cookie (HttpCookie)
The encoded cookie to decode of type HttpCookie.
Return Value
An object of type HttpCookie which is the decoded cookie.
Examples
The following C# example shows how to decode a cookie that has been encoded using "Encryption" only.
CopyC#
HttpCookie standardCookie = Request.Cookies["MyCookieName"];
if(standardCookie!=null)
    {
    HttpCookie decodedCookie = Rolosoft.WebControls.CookieSecure.Decode(standardCookie);
    //...Go on to process decoded cookie
    }
Exceptions
ExceptionCondition
CookieSecureExceptionThrown if cookie is invalid or tampered.

Assembly: Rolosoft.CookieSecure.Net (Module: Rolosoft.CookieSecure.Net) Version: 1.0.3134.36402 (1.0.0.0)