People have argued the right to not incriminate themselves right up to the European courts, but it was rejected. When you are arrested in the UK you are told that if you fail to mention when questioned anything you later rely on in court it may harm your defence, so there is no right to silence either.
What isn't clear from the story is if this guy just forgot his password or if he refused to hand it over. The law says that the police must prove you knew the password, e.g. by showing that you used it very recently.
Either way, it's a fucked up law that needs to be repealed.