Is a md5 string always 32 characters?

After thinking about it for a long time I decided to use the md5() function to encrypt the passwords of my members in the database. But is the length of a md5 string always 32 characters? I need to know this so I can update the password field of the table in the database.

Yes, unless you set the second parameter

Sean :slight_smile:

Yup

Yup it’s always 32 characters long. That’s the way the MD5 hashing algorithm works.

“If the optional raw_output is set to TRUE, then the md5 digest is instead returned in raw binary format with a length of 16.”

What’s the difference when using the raw_ouput option? I know that the length is then 16, but what else is different?

It’s… Uh… In BINARY instead of Hexadecimal.