Dozens of nations have been hit by a Chinese hacking campaign, a senior White House official has said.