Electrodeposited cobalt-sulfide catalyst for electrochemical and photoelectrochemical hydrogen generation from water.