コード例 #1
0
        public void AddProfile(string email)
        {
            string          sanitisedEmail = email.Replace("&", "").Replace("=", "");
            ValuePairParser cookie         = new ValuePairParser("email=" + sanitisedEmail + defaultProfile);

            profiles.Add(sanitisedEmail, cookie);
        }
コード例 #2
0
        public bool IsAdmin(Base64 encrypted)
        {
            string values   = cipher.Decrypt(key, encrypted, iv);
            string adminKey = "admin";

            ValuePairParser dictionaryManager = new ValuePairParser(values, ';');

            return(dictionaryManager.Contains(adminKey) && dictionaryManager[adminKey] == "true");
        }
コード例 #3
0
        public void AddProfile(string email, string encoded)
        {
            string decoded = cipher.Decrypt(key, encoded);

            if (profiles.ContainsKey(email))
            {
                profiles[email] = new ValuePairParser(decoded);
            }
            else
            {
                profiles.Add(email, new ValuePairParser(decoded));
            }
        }