From Wikipedia.

Cyaniding

Cyaniding is a case-hardening process that is fast and efficient; it is mainly used on low-carbon steels. The part is heated to 871-954 C (1600-1750 F) in a bath of sodium cyanide and then is quenched and rinsed, in water or oil, to remove any residual cyanide.

2NaCN + O2 → 2NaCNO
2NaCNO + O2 → Na2CO3 +CO + N2
2CO → CO2 + C

This process produces a thin, hard shell (between 0.25 - 0.75 mm, 0.01 and 0.03 inches) that is harder than the one produced by carburizing, and can be completed in 20 to 30 minutes compared to several hours so the parts have less opportunity to become distorted. It is typically used on small parts such as bolts, nuts, screws and small gears. The major drawback of cyaniding is that cyanide salts are poisonous.

Sure there are other ways to do it but two interesting points are speed, 20-30 minutes and less opportunity to become distorted.