The chloroperoxidase-catalyzed oxidation of thiols and disulfides to sulfenyl chlorides.