in reply to OT: Is MD5 ALWAYS 32 character long?

From the pod of Digest::MD5:
DESCRIPTION
The "Digest::MD5" module allows you to use the RSA Data Security Inc. MD5 Message Digest algorithm from within Perl programs. The algorithm takes as input a message of arbitrary length and produces as output a 128-bit "fingerprint" or "message digest" of the input.

So, the fingerprint is always a 128-bit value, which translates to 32 characters if you are using a hex-presentation of that value (each hex character taking 4 bits).

So, if you want to store the MD5 as a string, Char(32) would be ok. Ideally, you would want to store it as the 128-bit value, which your database may or may not support.

Liz

  • Comment on Re: OT: Is MD5 ALWAYS 32 character long?