Improvement of corrosion resistance of CoNi thin films by surface passivation