In vitro and in vivo corrosion measurements of magnesium alloys