SitePoint Sponsor

User Tag List

Results 1 to 6 of 6

Thread: md5 password

  1. #1
    SitePoint Addict eanimator's Avatar
    Join Date
    Sep 2005
    Posts
    396
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    md5 password

    Hi guys,


    any good method to display md5 converted password ??


    Thanks in advance

  2. #2
    . shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    PHP Code:
    <?php print md5('password'); ?>
    like that?
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.


  3. #3
    SitePoint Addict eanimator's Avatar
    Join Date
    Sep 2005
    Posts
    396
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by logic_earth
    PHP Code:
    <?php print md5('password'); ?>
    like that?
    NO!!!!!!!!

    It's like that:

    $pass = "12345";


    $md5_pass = md5 ($pass);



    echo($md5_pass); // prints 827ccb0eea8a706c4c34a16891f84e7b


    I want this "827ccb0eea8a706c4c34a16891f84e7b" to be converted in original whioch is "12345".

  4. #4
    SitePoint Guru
    Join Date
    Jun 2004
    Location
    Finland
    Posts
    703
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by eanimator
    NO!!!!!!!!

    It's like that:

    $pass = "12345";


    $md5_pass = md5 ($pass);



    echo($md5_pass); // prints 827ccb0eea8a706c4c34a16891f84e7b


    I want this "827ccb0eea8a706c4c34a16891f84e7b" to be converted in original whioch is "12345".
    It's a one-way algorithm, so there's no way to "decode" it back to normal. Bruteforcing and md5-hash databases are your only hope.

  5. #5
    SitePoint Evangelist
    Join Date
    Jun 2003
    Location
    Melbourne, Australia
    Posts
    440
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Why would you want to convert from an md5 hash to the original string? Is it because you'd like build a function that would e-mail a user's password back to him if he forgot it?

    I suppose you could use encryption instead, but perhaps a better way is to have your script make a new password and mail that to the user (as a temporary means of logging in) and advise the user to change it ASAP.
    Zealotry is contingent upon 100 posts and addiction 200?

  6. #6
    SitePoint Addict eanimator's Avatar
    Join Date
    Sep 2005
    Posts
    396
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yes. That's was wobbling in my mind too..


Bookmarks

Posting Permissions

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