Ni12P5 nanoparticles as an efficient catalyst for hydrogen generation via electrolysis and photoelectrolysis.