<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Tue, 21 May 2013 21:07:58 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Jonathan Street's Blog: Random thoughts on random strings]]></title>
      <guid>http://www.phpdeveloper.org/news/10535</guid>
      <link>http://www.phpdeveloper.org/news/10535</link>
      <description><![CDATA[<p>
On his blog, <i>Jonathan Street</i> has <a href="http://torrentialwebdev.com/blog/archives/157-Random-thoughts-on-random-strings.html">posted some "random thoughts"</a> on generating random (or not so random) strings in PHP.
</p>
<blockquote>
Humans are astoundingly bad at being random and I just slapped the keyboard a few times until I felt I had the required 16 characters. Writing some code to produce a fairly random string is incredibly easy. I've easily done it a dozen times or more. Though only because it is easier to re-write it than to find where I put the last one
</blockquote>
<p>
He gives two examples that work, but aren't the best possibilities for making truly random strings - one using mt_rand to select a random character from a string and the other using the same idea but instead using the char() function to replace the string of characters.
</p>
<p>
His other examples include the use of the uniqid function with the more_entropy setting enabled and an md5 or sha1 hash (for which he gives positives and negtives).
</p>]]></description>
      <pubDate>Thu, 03 Jul 2008 07:58:33 -0500</pubDate>
    </item>
  </channel>
</rss>
