md5() with salt encryption - PHP
Results 1 to 4 of 4

Thread: md5() with salt encryption - PHP

  1. #1
    Banned
    Join Date
    Nov 2003
    Posts
    68

    md5() with salt encryption - PHP

    i was wondering if anybody can tell me how to Encrypt a specific HASH with a Specific Salt
    i mean its like to be double hashed with a specific Salt

    i tried sumthing like

    <?
    $hash = md5($md5_1 . $salt) ;
    echo $hash ;
    ?>

    as an example i used :
    md5.php?md5_1=22ad09cd99118be452e1603d0574cef1&salt=wGK

    but the result was always the same
    d41d8cd98f00b204e9800998ecf8427e
    even if i didn't pass a value for md5_1 and salt

    well am a Beginner or less but need help to make that.

  2. #2
    Senior Member
    Join Date
    Nov 2001
    Posts
    1,255
    Well for one that won't work if register_globals is turned off, which it is by default, so it was hashing two null values.

    PHP Code:
    <?PHP
    $hash 
    MD5($_GET['md5_1'] . $_GET['salt']);
    echo 
    $hash;
    ?&
    gt
    Though that is simplistic and probably only useful as an example.
    Chris Shepherd
    The Nelson-Shepherd cutoff: The point at which you realise someone is an idiot while trying to help them.
    \"Well as far as the spelling, I speak fluently both your native languages. Do you even can try spell mine ?\" -- Failed Insult
    Is your whole family retarded, or did they just catch it from you?

  3. #3
    Banned
    Join Date
    Nov 2003
    Posts
    68
    thx chsh

  4. #4
    Senior Member
    Join Date
    Nov 2001
    Posts
    1,255
    You're welcome.
    Chris Shepherd
    The Nelson-Shepherd cutoff: The point at which you realise someone is an idiot while trying to help them.
    \"Well as far as the spelling, I speak fluently both your native languages. Do you even can try spell mine ?\" -- Failed Insult
    Is your whole family retarded, or did they just catch it from you?

Posting Permissions

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