Exemplo n.º 1
0
        public bool Verify(string account, string inputPassword, string otp)
        {
            var passwordFromDb = _Profile.GetPassword(account);

            var hashedPassword = _Hash.ComputeHash(inputPassword);

            var currentOtp = _OtpService.GetCurrentOtp(account);

            if (passwordFromDb == hashedPassword && otp == currentOtp)
            {
                return(true);
            }
            return(false);
        }
 private void GivenHash(string inputPassword, string hashedPassword)
 {
     _Hash.ComputeHash(inputPassword).Returns(hashedPassword);
 }