PDA

Click to See Complete Forum and Search --> : md5() Sizes... -[RESOLVED]-


Electroman
Nov 14th, 2004, 04:51 PM
Is there anyway to work out how long a string will be after you use md5() on it? Like for a password field I know the password will be between 6-12 characters but how big should I be making the field on the database to ensure it fits, without wasting too much space.

CornedBee
Nov 15th, 2004, 05:19 AM
An MD5 hash is a 128 bit number, that's 16 bytes. As a hexadecimal string, as PHP's md5 returns it, that's 32 characters.