Alloy catalysts of P-1NiB and P-1CoB were prepared by reduction of their acetate salts with NaBH4 in aqueous solution. Alloy catalysts of P-2WNiB and P-2WCoB were similarly prepared in ethanolic solution. The NiB and CoB catalysts prepared by this method