Exemplo n.º 1
0
        private bool IsExistsSafeKey()
        {
            HttpCookie cookie = context.Request.Cookies["aries_safekey"];

            if (cookie != null)
            {
                string value = EncrpytHelper.Decrypt(cookie.Value);
                if (value.StartsWith("aries:"))
                {
                    return(true);
                }
            }
            return(false);
        }
Exemplo n.º 2
0
        private static string GetTokenValue(int index)
        {
            string token = Token;

            if (!string.IsNullOrEmpty(token))
            {
                string text = EncrpytHelper.Decrypt(token);
                if (!string.IsNullOrEmpty(text))
                {
                    string[] items = text.Split(',');
                    if (items.Length > index)
                    {
                        return(items[index]);
                    }
                }
            }
            return(string.Empty);
        }