コード例 #1
0
        public void VerifyHashedPassword_returns_true_for_correct_password_and_correct_salt()
        {
            var passwordService = new PasswordService();

            var hashedPassword = passwordService.HashPassword(Password, Salt);

            Assert.IsTrue(passwordService.VerifyHashedPassword(Password, Salt, hashedPassword));
        }
コード例 #2
0
        public void VerifyHashedPassword_returns_false_for_incorrect_password_and_incorrect_salt()
        {
            var passwordService = new PasswordService();

            var hashedPassword = passwordService.HashPassword(Password, Salt);

            Assert.IsFalse(passwordService.VerifyHashedPassword("nottest", "notsalt", hashedPassword));
        }