The government is dancing between the raindrops. The 5th Amendment states that you cannot be compelled to testify against yourself. You have the right to remain silent. So how do they get around this? In my case, I personally was not held in contempt since that would have violated my constitutional right. Instead, the corporate officer was held in contempt, and since a corporation is not a person that right did not apply.
The bad news is that the government has held that anyone under investigation must submit a DNA sample, which they can then use to trace you or any member of your family who is suspected of a crime. Even worse is what courts have done with this regarding telephones. If you use a fingerprint scanner as a security feature on your computer or cell phone, they can trace it and throw you in prison until you do as the court demands because they regard any biological evidence as an exception. In other words, you are not being forced to testify against yourself. They are taking bodily evidence to find you guilty.
Now that measure may be acceptable in extreme cases such as rape. However, the government is simply using this to go after money. They need not even know that anything is on your phone. The mere fact that there might be evidence is sufficient to imprison you for life, without a trial, under civil contempt. Courts can and do order people to unlock their phones with their fingerprint. Providing a password is different from providing a fingerprint. So you might want to forget biotechnology for security. The legal implications are far different from a password.