Esempio n. 1
0
        public void Get_hash_with_alpha_numeric_and_other_letters()
        {
            string text = "5uPms(o0t!7kT~hxgP=xTtj-*6rSvdhI]hV^9tsx1S,*i_0!cn";
            string hash = Encripty.Crypt(text, password, key);

            Assert.NotEqual(text, hash);
            Assert.Equal(text, Encripty.Decrypt(hash, password, key));
        }
Esempio n. 2
0
        public void Get_hash_with_for_email()
        {
            string text = "*****@*****.**";
            string hash = Encripty.Crypt(text, password, key);

            Assert.NotEqual(text, hash);
            Assert.Equal(text, Encripty.Decrypt(hash, password, key));
        }
Esempio n. 3
0
        public void Get_hash_with_alpha_numeric()
        {
            string text = "5MkqSmxmux6eRVv17nfusWck98lHtc";
            string hash = Encripty.Crypt(text, password, key);


            Assert.NotEqual(text, hash);
            Assert.Equal(text, Encripty.Decrypt(hash, password, key));
        }
Esempio n. 4
0
        public void Get_hash_with_lowercase_compare()
        {
            string text      = "5uPms(o0t!7kT~hxgP=xTtj-*6rSvdhI]hV^9tsx1S,*i_0!cn";
            string textLower = text.ToLower();
            string hash      = Encripty.Crypt(text, password, key);
            string hashLower = Encripty.Crypt(textLower, password, key);

            Assert.NotEqual(text, hash);
            Assert.Equal(text, Encripty.Decrypt(hash, password, key));

            Assert.NotEqual(textLower, hashLower);
            Assert.Equal(textLower, Encripty.Decrypt(hashLower, password, key));

            Assert.NotEqual(textLower, text);
            Assert.NotEqual(hashLower, hash);
        }