That's weird however what about
Fifth Amendment Right...?
...most Americans know they have the right not to answer police questions both while in custody or in court...
Also watch this:
https://youtu.be/d-7o9xYp7eEAbove all, the border of a country is a legal limbo for the foreigner. For example, the people that make the decision of letting someone in the US are border agents. They may decide that they "suspect" that someone is there to look for work illegally and deny entry even if you have a visa to enter (and this does happen). It is quite a jungle.
Sorry for not watching the video, I like text

. I did some research, this is the
best text I found.
...the consequences for refusing to provide your password(s) are different for different classes of individuals. If you are a U.S. citizen, CBP cannot detain you indefinitely as you have a right to re-enter the country. However, agents may escalate the encounter (for example, by detaining you for more time), or flag you for heightened screening during future border crossings. If you are a lawful permanent resident, agents may also raise complicated questions about your continued status as a resident. If you are a foreign visitor, agents might deny you entry to the country entirely
So...
- If you are an US citizen you can call the 5th and, eventually, possible after making you loose a few hours, they will have to let you in. After all, you are entering your country and no-one can prevent you from doing so (I don't know if there are exceptions).
- If you are not, you can (and most likely will) be denied entry. This is at the discretion of the Border Agent, event if you have a visa in place.
However, and here's the ugly thing:
But whatever your status, whether you choose to provide your passwords or not, border agents may decide to seize your digital devices. While CBP guidelines set a five-day deadline for agents to return detained devices unless a CBP supervisor approves a lengthier detention, in practice, device detentions commonly last many months.
Which constitutes a good gun pointed at your head.