示例#1
0
        public bool Verify(string accountId, string password, string otp)
        {
            var passwordFromDb = _ProfileDao.GetPassword(accountId);

            var hashedPassword = _Hash.ComputeHash(password);

            var currentOtp = _Otp.GetOtp(accountId);

            if (passwordFromDb == hashedPassword && otp == currentOtp)
            {
                return(true);
            }

            return(false);
        }
示例#2
0
 private void GivenOtp(string account, string otp)
 {
     _Otp.GetOtp(account).Returns(otp);
 }