Protective layer of metal parts