Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7

Thread: md5 Info

  1. #1
    Regular Coder
    Join Date
    Oct 2008
    Posts
    255
    Thanks
    113
    Thanked 0 Times in 0 Posts

    md5 Info

    Is there like a chart somewhere that shows how long a string becomes after performing md5() on it, based on the length of the original string?
    Last edited by Joseph Witchard; 12-19-2008 at 01:52 AM.

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,853
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    Check the manual
    Quote Originally Posted by http://php.net/md5
    Return Values

    Returns the hash as a 32-character hexadecimal number.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • Users who have thanked abduraooft for this post:

    Joseph Witchard (12-19-2008)

  • #3
    Regular Coder
    Join Date
    Oct 2008
    Posts
    255
    Thanks
    113
    Thanked 0 Times in 0 Posts
    I'm sorry, didn't see that when I checked the manual. So the length will always be 32 characters?

  • #4
    Regular Coder
    Join Date
    Dec 2006
    Posts
    166
    Thanks
    9
    Thanked 4 Times in 4 Posts
    Yes, it will always be 32 characters in length.

  • Users who have thanked 194673 for this post:

    Joseph Witchard (12-19-2008)

  • #5
    Regular Coder
    Join Date
    Oct 2008
    Posts
    255
    Thanks
    113
    Thanked 0 Times in 0 Posts
    So would a user registration form that had it's password input maxlength property set to 20, and the password field in the MySQL table set to varchar with a length of 32 work?

    Sorry about all the questions. I messed up my login script tonight, and it took me awhile to figure out it was because I had changed the password length in the database.

  • #6
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,853
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    So would a user registration form that had it's password input maxlength property set to 20, and the password field in the MySQL table set to varchar with a length of 32 work?
    Yes, the output character length is independent of the input character length.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • Users who have thanked abduraooft for this post:

    Joseph Witchard (12-19-2008)

  • #7
    Regular Coder
    Join Date
    Oct 2008
    Posts
    255
    Thanks
    113
    Thanked 0 Times in 0 Posts
    Thanks!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •