<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Random numbers &#8211; a .Net function to return a random number</title>
	<atom:link href="http://cgaskell.wordpress.com/2006/12/05/random-numbers-a-function-to-return-a-random-number/feed/" rel="self" type="application/rss+xml" />
	<link>http://cgaskell.wordpress.com/2006/12/05/random-numbers-a-function-to-return-a-random-number/</link>
	<description>My notes on computer hardware, application development &#38; the odd extra</description>
	<lastBuildDate>Wed, 09 Dec 2009 09:13:26 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Terry Cornwell</title>
		<link>http://cgaskell.wordpress.com/2006/12/05/random-numbers-a-function-to-return-a-random-number/#comment-353</link>
		<dc:creator>Terry Cornwell</dc:creator>
		<pubDate>Wed, 07 Feb 2007 16:18:07 +0000</pubDate>
		<guid isPermaLink="false">http://cgaskell.wordpress.com/2006/12/05/random-numbers-a-function-to-return-a-random-number/#comment-353</guid>
		<description>Add this to last post DUH.....

// Now, this is real randomization.
Random random = new Random(seed);</description>
		<content:encoded><![CDATA[<p>Add this to last post DUH&#8230;..</p>
<p>// Now, this is real randomization.<br />
Random random = new Random(seed);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Terry Cornwell</title>
		<link>http://cgaskell.wordpress.com/2006/12/05/random-numbers-a-function-to-return-a-random-number/#comment-352</link>
		<dc:creator>Terry Cornwell</dc:creator>
		<pubDate>Wed, 07 Feb 2007 16:15:02 +0000</pubDate>
		<guid isPermaLink="false">http://cgaskell.wordpress.com/2006/12/05/random-numbers-a-function-to-return-a-random-number/#comment-352</guid>
		<description>^ see above, also, in a recent implementation I needed to generate a random string for a password (a dictionary would of been so much better). After a while I noticed just how non-random my random passwords were. So, I went with this

// Create a random seed
byte[] randomBytes = new byte[4];
RNGCryptoServiceProvider rng = new RNGCryptoServiceProvider();
rng.GetBytes(randomBytes);

// Convert 4 bytes into a 32-bit integer value.
seed = (randomBytes[0] &amp; 0x7f) </description>
		<content:encoded><![CDATA[<p>^ see above, also, in a recent implementation I needed to generate a random string for a password (a dictionary would of been so much better). After a while I noticed just how non-random my random passwords were. So, I went with this</p>
<p>// Create a random seed<br />
byte[] randomBytes = new byte[4];<br />
RNGCryptoServiceProvider rng = new RNGCryptoServiceProvider();<br />
rng.GetBytes(randomBytes);</p>
<p>// Convert 4 bytes into a 32-bit integer value.<br />
seed = (randomBytes[0] &amp; 0&#215;7f)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Phil Winstanley</title>
		<link>http://cgaskell.wordpress.com/2006/12/05/random-numbers-a-function-to-return-a-random-number/#comment-44</link>
		<dc:creator>Phil Winstanley</dc:creator>
		<pubDate>Tue, 05 Dec 2006 21:55:54 +0000</pubDate>
		<guid isPermaLink="false">http://cgaskell.wordpress.com/2006/12/05/random-numbers-a-function-to-return-a-random-number/#comment-44</guid>
		<description>Check out this article, it covers why Random() isn&#039;t very Random() :-)

http://www.codinghorror.com/blog/archives/000728.html</description>
		<content:encoded><![CDATA[<p>Check out this article, it covers why Random() isn&#8217;t very Random() <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p><a href="http://www.codinghorror.com/blog/archives/000728.html" rel="nofollow">http://www.codinghorror.com/blog/archives/000728.html</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>
