phpsha1encryptionsmf

PHP how sha1 get this?


I have my own little website and encrypting with sha1, now i try connect it to a SMF forum, but the sha1 codes is not the same?

My code

$password = "thisisatestpass";
$encrypted_password=sha1($password);
echo $encrypted_password; //03d858ce5f3b29b153b0392f196cff6f6e8684d0

SMF: 78481983d348ce4fbfabaccbb59af8ea95471f0c


Solution

  • I got it, you don't need the SALT to do this, all you need is the username and the password.

    The PHP code looks like this:

    $username = "name";
    $password = "pass";
    
    $login = sha1($username.$password);
    

    I asked for this and i just needed some time to try many ways, then this one worked. Thx any way guys :)