The contentious issue of customs officials and authorities demanding to search travelers' digital devices isn't one limited to the US. It's something that happens in other nations, too, including New Zealand and the UK. The latter of which has just seen a man convicted for not handing over his phone and laptop passwords.

Muhammad Rabbani, who is the international director of campaign group Cage, has been convicted of a terrorist offense after refusing to unlock his iPhone and MacBook Air while being detained at Heathrow Airport. He was ordered to pay £620 (around $833) in costs and given a conditional discharge for 12 months.

Rabbani says he was returning from a wedding in Qatar in November 2016 when he was stopped. He claims the devices contained evidence from a client of Cage, which was set up to raise "awareness of the plight of the prisoners at Guantanamo Bay and other detainees held as part of the War on Terror."

"It was a case involving the US against an individual who was allegedly tortured over the course of 12 or 13 years in US custody," he said.

"There were around 30,000 (documents) which I was especially uncomfortable handling and I felt an enormous responsibility to try and discharge the trust that was given to me and the lawyers I met at that event."

The court heard that Rabbani had been stopped more than 20 times in the past while crossing the British border. Two of these occasions saw him refuse to hand over his PIN number and password when asked, but this was the first instance where he had been charged for not complying. The prosecution said Rabbani was not chosen at random for the latest stop.

"I was prepared to face the outcome even if it meant a term of imprisonment," he said. "As the judge said, the importance of passwords and privacy cannot be overstated."

"I have been convicted of protecting the confidentiality of my client. Our only option is to change the law. We will be appealing this decision."

Rabbani was charged under schedule 7 of the UK's Terrorism Act 2000, which allows police to search a person's electronic devices when they are traveling through a port. It supposedly allows authorities to determine if someone is involved in the "commission, preparation or instigation of acts of terrorism." Refusal to cooperate is a criminal offense.