WASHINGTON — Gen. Keith B. Alexander, the director of the National Security Agency, said Tuesday that the leaks by the former agency contractor Edward J. Snowden had slowed the effort to protect the country against cyberattacks on Wall Street and other civilian targets.

General Alexander was speaking at a conference at Georgetown University in one of his last public speeches before he leaves the agency this spring. He predicted that the disclosure of information relating to government surveillance programs would force Congress to act on changes to the rules governing the bulk collection of telephone records before it tries again to pass legislation that would mandate the way private companies protect against cyberintrusions, and delineate what information they share about attacks with the government.

The departing N.S.A. director and commander of the United States Cyber Command, which runs the cyberwarfare and defense operations for the Pentagon, described as largely incomplete what he called one of the agency’s biggest tasks: finding a way to protect America’s most vulnerable civilian targets.

“An attack on Wall Street or an exploit against Wall Street, N.S.A. and Cyber Command would probably not see that,” General Alexander said. “We have no capability there.”