"Failure to hand over the password is an offence in and of itself. They don't have to prove anything else."
The offence is "Failure to comply" with a court order, and has nothing to do with the case itself. Which is why it is so cut and dry. The conviction in no way affects the outcome of the case, and the police are free to keep getting court orders and throwing this guy in jail when he fails to comply.