Corrosion of magnesium and its alloys