A federal appeals court on Monday rejected a fired Philadelphia police sergeant's argument that he has a Fifth Amendment right not to turn over computer passwords in a child-porn investigation.

Francis Rawls, has been jailed for contempt for 18 months amid the appeal. He has not been charged with a crime.

The U.S. Court of Appeals for the Third Circuit panel ruled that police already have evidence of child pornography on other devices belonging to Rawls. The panel said Rawls therefore would not be incriminating himself by helping them access the encrypted material.

A lawyer with the Electronic Frontier Foundation, who argued the case last year, disagreed.

"You're being compelled to provide the contents of your mind. That is squarely prohibited by the Fifth Amendment," senior staff attorney Mark Rumold said. "Law enforcement is asking [him] to produce evidence that they don't have to aid in his conviction."

Assistant U.S. Attorney Michelle Rotella said Rawls would sit in jail until he is ready to cooperate.

The case began in March 2015, when detectives with the Delaware County District Attorney's Office identified Rawls as a suspect in an investigation of the website Freenet, according to court documents. The site allegedly allowed users to share child porn, and investigators said data showed that devices owned by Rawls had been routing or requesting such files.

But after authorities seized an iPhone, Apple Mac Pro computer, and two external hard drives from Rawls' home, they were unable to unlock the encrypted hard drives, the documents say. The labeling of some files caused investigators to believe that the hard drives contained child pornography.

Rawls was ordered to give authorities the passwords to the hard drives, but said he could not remember them.