title: Php Mysql Secure Password Store
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <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>  </p>
  </blockquote>
  
  
  
  <p>What is the secure way or hash function to store password to Mysql Database? Now I'm using this sha1() function to store my password to DB with following code. Is it really Safe?</p>
  
  <pre><code>&lt;?php
  $pass = 123456789;
  $pass = sha1($pass);
  echo $pass;
  ?&gt;
  </code></pre>
  
  <p>Thanks for your advise. </p>
  
  <p><strong>Update</strong></p>
  
  <p>I see salt is something like this.  </p>
  
  <pre><code>$salt = "this is a salt";
  $password = 'this is an password';
  $hash = sha1($salt.$password);
  </code></pre>
  
  <p>So, Can i use any number/random number/something to $salt value? After that is it Now <strong>SAFE?</strong></p>