Fix digest->hex-string.

Digest strings are fixed size (e.g. 32 characters for MD5), this means
that numbers smaller than 15 need to have an extra 0 in front to keep
the correct digest length.