title: PHP Strongest one way encryption/hashing method
body: <p>I have a site on which people can sign up and I need to encrypt their password. I've researched it but I can't find any methods that won't be beat by the power of a modern GPU.</p>
  
  <p>So I have come to the good people of StackOverflow to ask, what is the strongest method of encryption possible, I have done my best to stop people getting their hands on the database but I want to be as sure as possible that their data would be fine if the database was somehow stolen.</p>
  
  <p>Other things I wonder are, would be it be safer to just randomize the characters in the password somehow but in a way where you would be able to randomize them again for login?</p>
  
  <p><strong>Edit:</strong>
  I have used the implementation of bcrypt by Andrew Moore (<a href="https://stackoverflow.com/questions/4795385/how-do-you-use-bcrypt-for-hashing-passwords-in-php">How do you use bcrypt for hashing passwords in PHP?</a>) and come up with this: </p>
  
  <pre><code>public static function Encrypt($Str,$Salt)
  {
      $bcrypt = new \bcrypt();
      return $bcrypt-&gt;hash(SERVER_SALT . md5($Str) . $Salt);
  }
  </code></pre>
  
  <p>if anyone sees anything wrong with it or any weaknesses please tell me.</p>