title: How to generate a good salt - Is my function secure enough?
body: <p>Here's the function I'm using to generate random salts:</p>
  
  <pre><code>function generateRandomString($nbLetters){
      $randString="";
      $charUniverse="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
      for($i=0; $i&lt;$nbLetters; $i++){
         $randInt=rand(0,61);
          $randChar=$charUniverse[$randInt];
          $randString=$randomString.$randChar;
      }
      return $randomString;
  }
  </code></pre>
  
  <p>This is for a non commercial website.  It's only used to generate the salt (to be stored in the db and used along with the user submitted pw for hashing).</p>
  
  <p>Is this appropriate?  Should I use a larger subset of characters, and if so is there an easy way to do that in PHP?</p>