Maximum MD5 Value for 20-Character Password

Posted on 2007-07-23
Last Modified: 2008-02-01
I'm writing an application that stores encrypted passwords using the MD5 functionality provided in .NET.

I've restricted the plain-text password field in the application to 20 characters and I now need to know if the MD5 hash value itself will ever exceed 20 characters (for storage purposes).

If the user can type 20-characters into a plain-text field, what is the maximum length of the MD5 character string that could be generated?

Question by:sterrius
    LVL 18

    Accepted Solution

    MD5 is a fixed size 128-bit hash. So it is always 128/8 = 16 bytes long. It is usually represented as a 32 hex character string.
    So if you will store it as a binary then the size is always 16.
    If you will store it as hex then the size is always 32.

    LVL 53

    Expert Comment

    I don't have anything to add to PowerIT's excellent answer, but in case you want to know more about MD5, this is a nice source of information :

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    A few customers have recently asked my thoughts on Password Managers.  As Security is a big part of our industry I was initially very hesitant and sceptical about giving a program all of my secret passwords.  But as I was getting asked about them mo…
    Cybersecurity has become the buzzword of recent years and years to come. The inventions of cloud infrastructure and the Internet of Things has made us question our online safety. Let us explore how cloud- enabled cybersecurity can help us with our b…
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    794 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now