The fifth amendment only applies to specific things, and applies more before you're formally charged. After being formally charged, the court can hold you indefinitely for contempt of court if you refuse to tell them your password to encrypted files.:
[1][2][3]