Corrosion of electronic and magnetic materials