Electrodeposition and corrosion processes