Throw IllegalArgumentException on invalid hex-strings.

Beats returning null since there's let's chance it will be interpreted
as the lack of a password.

Change-Id: I4986a8e806d9066129f696ab9f2e80655424e723
Merge "Throw IllegalArgumentException on invalid hex-strings."