The thing that allows these password disclosing laws to be compatible with self-incrimination is that the password itself is not the evidence, you are being compelled to give up other documentary evidence that incriminates you. This is common. People (companies in particular) are often forced to give up evidence that is used against them (corporate fraud convictions etc).