Control of the corrosion resistance of TiN-coated AISI 304 stainless steel