public bool CheckSecretQuestionAnswer(ISecretQuestionAnswer storedAnswer, string answer) { Util.Check(storedAnswer != null, "Stored answer may not be null"); var hash = GetWeakSecretAnswerHash(answer, storedAnswer.Login.Id); if(hash == storedAnswer.AnswerHash) return true; var session = EntityHelper.GetSession(storedAnswer); OnLoginEvent(session.Context, LoginEventType.QuestionAnswersFailed, storedAnswer.Login, "Question #" + storedAnswer.Number); return false; }
public bool CheckSecretQuestionAnswer(ISecretQuestionAnswer storedAnswer, string answer) { Util.Check(storedAnswer != null, "Stored answer may not be null"); var hash = GetWeakSecretAnswerHash(answer, storedAnswer.Login.Id); if (hash == storedAnswer.AnswerHash) { return(true); } var session = EntityHelper.GetSession(storedAnswer); OnLoginEvent(session.Context, LoginEventType.QuestionAnswersFailed, storedAnswer.Login, "Question #" + storedAnswer.Number); return(false); }
private bool CheckUserAnswer(ISecretQuestionAnswer storedAnswer, string userAnswer) { var ahash = GetWeakSecretAnswerHash(userAnswer, storedAnswer.Login.Id); return ahash == storedAnswer.AnswerHash; }
private bool CheckUserAnswer(ISecretQuestionAnswer storedAnswer, string userAnswer) { var ahash = GetWeakSecretAnswerHash(userAnswer, storedAnswer.Login.Id); return(ahash == storedAnswer.AnswerHash); }