Coating made of hafnium or Hf-based alloys