<?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"
	>
<channel>
	<title>Comments on: random passwords</title>
	<atom:link href="http://wonkabar.org/archives/152/feed" rel="self" type="application/rss+xml" />
	<link>http://wonkabar.org/archives/152</link>
	<description>linux, databases, cartoons and cornflakes</description>
	<pubDate>Tue, 06 Jan 2009 09:23:58 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.2</generator>
		<item>
		<title>By: Arnaud Launay</title>
		<link>http://wonkabar.org/archives/152#comment-675</link>
		<dc:creator>Arnaud Launay</dc:creator>
		<pubDate>Fri, 11 Aug 2006 08:49:50 +0000</pubDate>
		<guid isPermaLink="false">http://wonkabar.org/?p=152#comment-675</guid>
		<description>Personally, I use the following shell code:

head -c 8 /dev/urandom &#124; uuencode -m - &#124; tail -n 2 &#124; head -c 8; echo</description>
		<content:encoded><![CDATA[<p>Personally, I use the following shell code:</p>
<p>head -c 8 /dev/urandom | uuencode -m - | tail -n 2 | head -c 8; echo</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://wonkabar.org/archives/152#comment-673</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Fri, 11 Aug 2006 01:55:56 +0000</pubDate>
		<guid isPermaLink="false">http://wonkabar.org/?p=152#comment-673</guid>
		<description>@Andy

That's sweet man ... gotta learn Python. :T

Plus, PHP needs a rand_password() function.</description>
		<content:encoded><![CDATA[<p>@Andy</p>
<p>That&#8217;s sweet man &#8230; gotta learn Python. :T</p>
<p>Plus, PHP needs a rand_password() function.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andy Dustman</title>
		<link>http://wonkabar.org/archives/152#comment-672</link>
		<dc:creator>Andy Dustman</dc:creator>
		<pubDate>Fri, 11 Aug 2006 01:54:04 +0000</pubDate>
		<guid isPermaLink="false">http://wonkabar.org/?p=152#comment-672</guid>
		<description>Python version:

def generate_password(bits=48):
    """Generate a password that has at least the number of bits of
    entropy requested (default: 48)."""
    from math import ceil
    bytes = int(ceil(bits / 8.0))
    return file('/dev/urandom').read(bytes).encode('base64').replace('=', '')

or if you just want an one-line expression:

password = file('/dev/urandom').read(6).encode('base64').replace('=', '')

will give you 8-character (48-bit) passwords.</description>
		<content:encoded><![CDATA[<p>Python version:</p>
<p>def generate_password(bits=48):<br />
    &#8220;&#8221;"Generate a password that has at least the number of bits of<br />
    entropy requested (default: 48).&#8221;"&#8221;<br />
    from math import ceil<br />
    bytes = int(ceil(bits / 8.0))<br />
    return file(&#8217;/dev/urandom&#8217;).read(bytes).encode(&#8217;base64&#8242;).replace(&#8217;=', &#8221;)</p>
<p>or if you just want an one-line expression:</p>
<p>password = file(&#8217;/dev/urandom&#8217;).read(6).encode(&#8217;base64&#8242;).replace(&#8217;=', &#8221;)</p>
<p>will give you 8-character (48-bit) passwords.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve's Lover</title>
		<link>http://wonkabar.org/archives/152#comment-671</link>
		<dc:creator>Steve's Lover</dc:creator>
		<pubDate>Thu, 10 Aug 2006 23:20:38 +0000</pubDate>
		<guid isPermaLink="false">http://wonkabar.org/?p=152#comment-671</guid>
		<description>You, my friend, are a geek.  But I got NUTHIN' but love for ya.</description>
		<content:encoded><![CDATA[<p>You, my friend, are a geek.  But I got NUTHIN&#8217; but love for ya.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
