A former director of the National Security Agency slammed Donald Trump Donald John TrumpUS reimposes UN sanctions on Iran amid increasing tensions Jeff Flake: Republicans 'should hold the same position' on SCOTUS vacancy as 2016 Trump supporters chant 'Fill that seat' at North Carolina rally MORE for his comments about Muslims, saying his rhetoric is harmful to U.S. security.

“The jihadist narrative is that there is undying enmity between Islam and the modern world, so when Trump says they all hate us, he’s using their narrative," Michael Hayden said during a talk at the Hay Festival, according to The Guardian.

ADVERTISEMENT

"He’s feeding their recruitment video.”

Trump in March said that "Islam hates us" and "it's hard to separate" the religion from its radical offshoots. He has also called for a temporary ban on all Muslims coming into the country.

During the talk, Hayden also addressed Edward Snowden, saying what he did was damaging.

“The 2 percent of what Snowden revealed that had to do with privacy accelerated a necessary conversation," he said.

"The other 98 percent was about how the U.S. and foreign governments collected legitimate material … that was incredibly damaging."

He also pivoted to address a question about giving information to social media companies, such as Facebook. He was asked how much information social media companies receive and if the public should trust them more than the NSA.

“I have my views on that,” Hayden said.

“Your habits are all geared to protecting privacy against the government because that was always the traditional threat. That is no longer the pattern, it is the private sector … we are going through a cultural adjustment.