Ejemplo n.º 1
0
        public static UserData GetUser(HttpCookieCollection cookies)
        {
            try {
                HttpCookie cookie = cookies["AdminDataJson"];
                if (cookie == null)
                {
                    return(null);
                }

                return(JsonConvert.DeserializeObject <UserData>(Cryptography.AESDecryptString(cookie.Value)));
            }
            catch (Exception) {
                return(null);
            }
        }