[TriLUG] MD5 silly question
Daniel Zhang
zhang at clinicaltools.com
Thu Jul 8 11:37:07 EDT 2004
Java MD5 MessageDigest is based on RFC 1321(http://rfc.net/rfc1321.html)
which "The algorithm takes as input a message of arbitrary length and
produces as output a 128-bit "fingerprint" or "message digest" of the
input". In reality, it used a Hex encoding which sometimes patchs "0"
before small number(0x10). In decimal world it is a 32-character long
string. If your MD5 output is less than 32-char long, it means that you
forgot to add "0". Please refer to Brent's email for MD5 java code.
Daniel
Brian Henning wrote:
>-<snip brent's reply about hex encoding>-
>Sorry, should have mentioned I knew that already. I've already got my java
>program outputting a hex string, for easy storage in a mysql varchar item.
>The unicode vs. ASCII argument sounds feasable, though..
>
>Thanks for the insight!
>
>~B
>
>
>
>
More information about the TriLUG
mailing list