Here's a quick howto on blackening steel hardware such as bolts, nuts, etc. I'm using Jax Iron, Steel, and Metal Blackener, that you can find on Amazon: JAX https://a.co/d/aQTbk1r
Once the part is bare metal, the process only takes seconds. I've tested it, and it seems to provide a rust resistant finish.