Australian lawmakers passed anti-hate legislation on Thursday that enforces minimum sentences for a string of offences including a year in jail for a Nazi salute.