Both of these examples are rather bizarre, and I don't really see how they would be fundamentally different than warrants for stuff IRL.
In situation A, if you'd been keeping journal entries on paper, you'd have to show them to cops who had a warrant. Why should it be any different if you had typed it on your computer?
In situation B, someone could leave a locked safe on your desk instead of encrypting some files on your computer.
The law doesn't have to account for all possible options. It's generally trying to prove beyond reasonable doubt. For the most part with encrypted stuff, if it's beyond reasonable doubt that the person knows the password, I don't see why they should be able to withhold files on their computer when they wouldn't be able to withhold files in their filing cabinet. Just because it's digital, I don't see why it's different.