コード例 #1
0
 public int GetEncryptedIntCookie(string name)
 {
     if (RequestCookies[name] != null)
     {
         return(int.Parse(CryptographyUtility.DecryptString(RequestCookies[name].Value)));
     }
     return(-1);
 }
コード例 #2
0
 public string GetEncryptedStringCookie(string name, string defaultValue)
 {
     if (RequestCookies[name] != null)
     {
         return(CryptographyUtility.DecryptString(RequestCookies[name].Value));
     }
     return(defaultValue);
 }