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

            profiles.Add(sanitisedEmail, cookie);
        }
        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");
        }
Example #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));
            }
        }