The National Geographic channel just ran a marathon over the Canada Day holidays for the show Border Security which shows the Canadian Border Security Agency (CBSA) in action. It was a real eye opener. One of the first things they go for when they're questioning someone is their mobile phone so they can read the person's texts and emails. They busted countless people by finding incriminating emails (which basically revealed why people were really crossing the border). Another guy had a portable hard drive and they searched that image by image looking for bestiality or child porn (they found the latter); they didn't seem to care about regular porn as they pointed out that it's legal. One person had no texts and the guards were immediately suspicious, saying to the camera "Who doesn't have any texts on their phone?" Often they would take the person's devices and disappear into a back room where they'd do a thorough search.
They never showed them asking for a password so either they edited that part out, there were no passwords on the phones, or they broke the password in the back room.
It was a real eye opener for me and I've started to go through my phone to see what needs to be deleted next time I cross the border. If you're going to the US (and even to Canada if the new law passes), anything that hints of soliciting prostitution can get you barred and possibly even banned for a period of time. The US has a "moral turpitude" classification that basically says if you've been involved (charged/convicted) of anything to do with violence, drugs, or sexual crimes then you're inadmissible without special permission. I strongly suspect solicitation would fall into that classification.
For all those people waving their rights around and saying use this or that encryption, yeah, good luck with that. At best the CBSA will just send you packing back where you came from but far more likely is they'll hammer down on you and really make your life miserable. Oh yeah, and put a big honking red flag on your file for every future time you try to cross the border. So go ahead, try to play philadelphia lawyer or cyber guru. Just make sure the Border Security show is filming cuz I want to laugh at the hell they put you through.
http://www.ezbordercrossing.com/the-inspection-experience/border-searches/#.U7ctCrGGe4o