Esempio n. 1
0
        public void EncryptTest()
        {
            string password          = "******";
            string encryptedPassword = PasswordHash.Encrypt(password);
            string expected          = PasswordHash.Decrypt(encryptedPassword);

            Assert.AreEqual(expected, password);
            Assert.AreNotEqual(password, encryptedPassword);
        }
Esempio n. 2
0
        public void DecryptTest()
        {
            string password          = "******";
            string encryptedPassword = PasswordHash.Encrypt(password);
            string expected          = PasswordHash.Decrypt(encryptedPassword);

            Assert.AreNotEqual(password, encryptedPassword);
            Assert.AreEqual(expected, password);
        }