An Electrochemical Model for Environmental Cracking of Metals