Corrosion of titanium for biomedical applications