Apple’s general counsel, Bruce Sewell, said at the hearing that encryption did not prevent the authorities from solving crimes.

“As you heard from our colleagues in law enforcement, they have the perception that encryption walls off information to them,” Mr. Sewell said. “But technologists and national security experts don’t see the world that way. We see a data-rich world that seems to be full of information. Information that law enforcement can use to solve — and prevent — crimes.”

Mr. Sewell also defended Apple’s security practices, saying the company always aimed to keep its devices safe from prying eyes. Within the last two years, he said, the Chinese government has requested Apple’s source code but the company has refused to hand it over. In a public report on Monday, the company said American law enforcement officials made 4,000 requests for customer data covering more than 16,000 devices in the second half of last year.

Law enforcement officials testifying before the committee on Tuesday expressed frustration over their inability to run a number of cases to ground — particularly sex abuse and child pornography cases — because of encrypted phones. They said the recent publicity over the issue could end up helping criminals.

“Make no mistake — criminals are listening to this testimony and learning from it,” said Charles Cohen, commander of the Indiana Internet Crimes Against Children Task Force.

The F.B.I. said there has been an increase in the number of devices it has acquired through investigations but was unable to gain access to because of encryption. Ms. Hess said that since October, 13 percent of the devices obtained by the F.B.I. were impenetrable by the agency. When asked at Tuesday’s hearing if the relationship between the tech industry and law enforcement had become adversarial, Ms. Hess responded, “I hope not.”

The encryption debate is continuing in other quarters. Apple is fighting an order in a federal court in New York to provide access to a phone involved in a criminal drug investigation. And last week, Senator Richard Burr, the chairman of the Senate Intelligence Committee and a Republican, and Dianne Feinstein, the ranking Democrat on the committee, released a draft version of a bill that would require tech companies to decrypt data if requested by a court.