A former police sergeant has been held without charges in a federal detention cell in Philadelphia, part of an effort by the authorities to pressure him to decrypt two computer hard drives believed to contain child pornography.

The case reveals yet another battle line for law enforcement and digital privacy advocates over encryption, this time on an Apple computer, not an iPhone.

The sergeant, Francis Rawls, was ordered by a federal court last August to hand over the two hard drives, which were seized from his home because they were suspected to contain the illegal pornography.

Mr. Rawls was shown to a private room at the district attorney’s office to comply with the order. Once there, according to a court document, he spent most of the time staring at the computer and then said he could not remember the passwords to turn off FileVault, a feature of Macs that encrypts hard drives when a user logs out. He was taken into custody, and this week he started his eighth month in a federal detention center, all without ever being charged with a crime.