Results 1 to 2 of 2

Thread: md5() Sizes... -[RESOLVED]-

  1. #1

    Thread Starter
    Ex-Super Mod'rater Electroman's Avatar
    Join Date
    Sep 2000
    Location
    Newcastle, England
    Posts
    4,349

    Resolved md5() Sizes... -[RESOLVED]-

    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.
    Last edited by Electroman; Nov 15th, 2004 at 06:54 AM.
    When your thread has been resolved please edit the original post in the thread ()
    and amend "-[RESOLVED]-" to the end of the title and change the icon to , Thank you.

    When posting Code use the [VBCode]Code Here[/VBCode] tags to be able to use the code highlighting.

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    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.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

Posting Permissions

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



Click Here to Expand Forum to Full Width