title: should i use urandom or openssl_random_pseudo_bytes?
body: <p>I am developing a site in php 5.4 and i was wondering which is better to use to gen a random salt for password security?</p>
  
  <pre><code>$salt = sha1(openssl_random_pseudo_bytes(23));
  </code></pre>
  
  <p>or</p>
  
  <pre><code>$seed = '';
  $a = @fopen('/dev/urandom','rb');
  $seed .= @fread($a,23);
  $salt = sha1(seed);
  </code></pre>
  
  <p>or should i just go with:</p>
  
  <pre><code>$salt =  openssl_random_pseudo_bytes(40);
  </code></pre>
  
  <p>or</p>
  
  <pre><code>$salt = '';
  $a = @fopen('/dev/urandom','rb');
  $salt .= @fread($a,23);
  </code></pre>