public boolean authenticateUser(String username,String password,String uri) throws DataAccessException {
  if (null == username || null == password) {
    return false;
  }
  UserInfo user=getUserInfo(username);
  if (user == null) {
    return false;
  }
  String hashedSaltedPassword=Utilities.getSaltedPassword(username,uri,password);
  return hashedSaltedPassword.equals(user.getHashedPassword());
}

public boolean authenticateUser ( String username , String password , String uri ) throws DataAccessException { if ( null == username || null == password ) { return false ; } UserInfo user = getUserInfo ( username ) ; if ( user == null ) { return false ; } String hashedSaltedPassword = Utilities . getSaltedPassword ( username , uri , password ) ; return hashedSaltedPassword . equals ( user . getHashedPassword ( ) ) ; }
authenticates the given username , password combination . hash of password is matched against the hash value stored for password field
