private bool validateEmailPassword(string email, string password) { //get the hashed password from the database string realPassword = studentHandler.GetStudentPassword(email); if (realPassword == null) { return(false); } //check if the hashed password in the database matches with the input password bool doesPasswordsMatch = BCryptHelper.CheckPassword(password, realPassword); if (doesPasswordsMatch) { return(true); } else { return(false); } }