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-7o9xYp7eEThe actual amendment that pertains here is the 4th - prohibition against searches and seizures without probable cause - but border crossings are an exception, even for US citizens returning to the US. You can still refuse to be searched but you won't be allowed back into the country.
IANAL, but I don't think a law compelling US citizens to supply computer or phone passwords to US border/customs agents would fly; citizens of other countries would be fair game, though.