A 19-year-old was sentenced to 16 weeks in a young offenders institution for refusing to hand over a password to an encrypted file from his computer to the police.
Oliver Drage from Lancashire, UK, was arrested in May 2009 as part of an investigation into child sexual abuse images.
Police seized the computer but could not access some material which was protected with a 50-character encryption password.
The password was formally requested from Drage, however, he refused to co-operate, which is an offence under the Regulation of Investigatory Powers Act. He is the second person in history to be arrested for this.
Officers are still attempting to access the files.
"Drage was previously of good character so the immediate custodial sentence handed down by the judge in this case shows just how seriously the courts take this kind of offence,” said Det Sgt Neil Fowler.
"Computer systems are constantly advancing and the legislation used here was specifically brought in to deal with those who are using the internet to commit crime.
"It sends a robust message out to those intent on trying to mask their online criminal activities that they will be taken before the courts with the ultimate sanction, as in this case, being a custodial sentence," he said.