<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Pembi's Random Ramblings &#187; Software</title>
	<atom:link href="http://blog.pembi.net/category/reviews/software/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.pembi.net</link>
	<description>WARNING: May contain nuts.</description>
	<lastBuildDate>Fri, 20 Aug 2010 00:03:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>PswGen Toolbar Updated</title>
		<link>http://blog.pembi.net/pswgen-toolbar-updated</link>
		<comments>http://blog.pembi.net/pswgen-toolbar-updated#comments</comments>
		<pubDate>Sat, 01 Aug 2009 05:49:17 +0000</pubDate>
		<dc:creator>Ken</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://blog.pembi.net/?p=741</guid>
		<description><![CDATA[v0.9.3 is now available on the Mozilla Addons site at https://addons.mozilla.org/en-US/firefox/addon/13261 This version includes functional Options at last &#8211; you can now switch the &#8220;Follow Me&#8221; feature off if you want to, and I&#8217;ve added a &#8220;Hide Password&#8221; toggle so that not only do you never need to type your passwords in, they&#8217;re not even [...]]]></description>
			<content:encoded><![CDATA[<p>v0.9.3 is now available on the Mozilla Addons site at <a href="https://addons.mozilla.org/en-US/firefox/addon/13261">https://addons.mozilla.org/en-US/firefox/addon/13261</a></p>
<p>This version includes functional Options at last &#8211; you can now switch the &#8220;Follow Me&#8221; feature off if you want to, and I&#8217;ve added a &#8220;Hide Password&#8221; toggle so that not only do you never need to type your passwords in, they&#8217;re not even shown on the screen any more.</p>
<p>Be aware that there is a bug with the way new &#8220;experimental&#8221; add-ons are handled on the add-ons site, and they show a &#8220;invalid file hash&#8221; error when installing <em>unless</em> you first log in to the add-ons site. This is NOT a fault with the add-on itself, regardless of what the message says.</p>

<div class="sociable">
<div class="sociable_tagline">
Link from your social page:
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fblog.pembi.net%2Fpswgen-toolbar-updated&amp;t=PswGen%20Toolbar%20Updated" title="Facebook"><img src="http://blog.pembi.net/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fblog.pembi.net%2Fpswgen-toolbar-updated&amp;t=PswGen%20Toolbar%20Updated" title="MySpace"><img src="http://blog.pembi.net/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://twitter.com/home?status=PswGen%20Toolbar%20Updated%20-%20http%3A%2F%2Fblog.pembi.net%2Fpswgen-toolbar-updated" title="Twitter"><img src="http://blog.pembi.net/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fblog.pembi.net%2Fpswgen-toolbar-updated&amp;title=PswGen%20Toolbar%20Updated&amp;annotation=v0.9.3%20is%20now%20available%20on%20the%20Mozilla%20Addons%20site%20at%20https%3A%2F%2Faddons.mozilla.org%2Fen-US%2Ffirefox%2Faddon%2F13261%0D%0A%0D%0AThis%20version%20includes%20functional%20Options%20at%20last%20-%20you%20can%20now%20switch%20the%20%22Follow%20Me%22%20feature%20off%20if%20you%20want%20to%2C%20and%20I%27ve%20added%20a%20%22Hide%20Pas" title="Google Bookmarks"><img src="http://blog.pembi.net/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.pembi.net/pswgen-toolbar-updated/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>PswGen FireFox Toolbar now available!</title>
		<link>http://blog.pembi.net/pswgen-firefox-toolbar-now-available</link>
		<comments>http://blog.pembi.net/pswgen-firefox-toolbar-now-available#comments</comments>
		<pubDate>Sun, 26 Jul 2009 16:05:34 +0000</pubDate>
		<dc:creator>Ken</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://blog.pembi.net/?p=738</guid>
		<description><![CDATA[Wheeee! You can get it from the Mozilla addons site. Link from your social page:]]></description>
			<content:encoded><![CDATA[<p>Wheeee! You can get it <a href="https://addons.mozilla.org/en-US/firefox/addon/13261">from the Mozilla addons site</a>.</p>

<div class="sociable">
<div class="sociable_tagline">
Link from your social page:
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fblog.pembi.net%2Fpswgen-firefox-toolbar-now-available&amp;t=PswGen%20FireFox%20Toolbar%20now%20available%21" title="Facebook"><img src="http://blog.pembi.net/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fblog.pembi.net%2Fpswgen-firefox-toolbar-now-available&amp;t=PswGen%20FireFox%20Toolbar%20now%20available%21" title="MySpace"><img src="http://blog.pembi.net/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://twitter.com/home?status=PswGen%20FireFox%20Toolbar%20now%20available%21%20-%20http%3A%2F%2Fblog.pembi.net%2Fpswgen-firefox-toolbar-now-available" title="Twitter"><img src="http://blog.pembi.net/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fblog.pembi.net%2Fpswgen-firefox-toolbar-now-available&amp;title=PswGen%20FireFox%20Toolbar%20now%20available%21&amp;annotation=Wheeee%21%20You%20can%20get%20it%20from%20the%20Mozilla%20addons%20site." title="Google Bookmarks"><img src="http://blog.pembi.net/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.pembi.net/pswgen-firefox-toolbar-now-available/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Google launches Chrome OS project</title>
		<link>http://blog.pembi.net/google-launches-chrome-os-project</link>
		<comments>http://blog.pembi.net/google-launches-chrome-os-project#comments</comments>
		<pubDate>Tue, 21 Jul 2009 10:48:38 +0000</pubDate>
		<dc:creator>Ken</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://blog.pembi.net/?p=734</guid>
		<description><![CDATA[While I&#8217;m not a great fan of Google&#8217;s Chrome web browser (I&#8217;m a FireFox junkie), I&#8217;m very pleased to hear about Google&#8217;s Chrome OS initiative. They have the resources to get this off to a good start &#8211; and then they&#8217;ll open-source it. Could this be the push that Linux needed to finally go mainstream [...]]]></description>
			<content:encoded><![CDATA[<p>While I&#8217;m not a great fan of Google&#8217;s Chrome web browser (I&#8217;m a FireFox junkie), I&#8217;m very pleased to hear about Google&#8217;s Chrome OS initiative. They have the resources to get this off to a good start &#8211; <em>and then they&#8217;ll open-source it</em>. Could this be the push that Linux needed to finally go mainstream and become a real choice for consumers? <a href="http://googleblog.blogspot.com/2009/07/introducing-google-chrome-os.html">Read more about it here.</a></p>

<div class="sociable">
<div class="sociable_tagline">
Link from your social page:
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fblog.pembi.net%2Fgoogle-launches-chrome-os-project&amp;t=Google%20launches%20Chrome%20OS%20project" title="Facebook"><img src="http://blog.pembi.net/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fblog.pembi.net%2Fgoogle-launches-chrome-os-project&amp;t=Google%20launches%20Chrome%20OS%20project" title="MySpace"><img src="http://blog.pembi.net/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://twitter.com/home?status=Google%20launches%20Chrome%20OS%20project%20-%20http%3A%2F%2Fblog.pembi.net%2Fgoogle-launches-chrome-os-project" title="Twitter"><img src="http://blog.pembi.net/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fblog.pembi.net%2Fgoogle-launches-chrome-os-project&amp;title=Google%20launches%20Chrome%20OS%20project&amp;annotation=While%20I%27m%20not%20a%20great%20fan%20of%20Google%27s%20Chrome%20web%20browser%20%28I%27m%20a%20FireFox%20junkie%29%2C%20I%27m%20very%20pleased%20to%20hear%20about%20Google%27s%20Chrome%20OS%20initiative.%20They%20have%20the%20resources%20to%20get%20this%20off%20to%20a%20good%20start%20-%20and%20then%20they%27ll%20open-source%20it.%20Could%20this%20be%20th" title="Google Bookmarks"><img src="http://blog.pembi.net/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.pembi.net/google-launches-chrome-os-project/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PswGen for Windows now available!</title>
		<link>http://blog.pembi.net/pswgen-for-windows-now-available</link>
		<comments>http://blog.pembi.net/pswgen-for-windows-now-available#comments</comments>
		<pubDate>Mon, 29 Jun 2009 20:21:11 +0000</pubDate>
		<dc:creator>Ken</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://blog.pembi.net/?p=702</guid>
		<description><![CDATA[If you can&#8217;t be bothered with Python, don&#8217;t trust the web service, and can&#8217;t wait for Ken to finish the FireFox add-on&#8230; Now available on the PswGen page. Link from your social page:]]></description>
			<content:encoded><![CDATA[<p><img src="http://blog.pembi.net/wp-content/uploads/2009/05/PswGen-Screen.PNG" alt="PswGen-Screen" title="PswGen-Screen" width="413" height="111" class="alignnone size-full wp-image-697" /><br />
If you can&#8217;t be bothered with Python, don&#8217;t trust the web service, and can&#8217;t wait for Ken to finish the FireFox add-on&#8230; Now available <a href="http://blog.pembi.net/essentials/essential-security/pembis-perfect-passwords">on the PswGen page</a>.</p>

<div class="sociable">
<div class="sociable_tagline">
Link from your social page:
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fblog.pembi.net%2Fpswgen-for-windows-now-available&amp;t=PswGen%20for%20Windows%20now%20available%21" title="Facebook"><img src="http://blog.pembi.net/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fblog.pembi.net%2Fpswgen-for-windows-now-available&amp;t=PswGen%20for%20Windows%20now%20available%21" title="MySpace"><img src="http://blog.pembi.net/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://twitter.com/home?status=PswGen%20for%20Windows%20now%20available%21%20-%20http%3A%2F%2Fblog.pembi.net%2Fpswgen-for-windows-now-available" title="Twitter"><img src="http://blog.pembi.net/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fblog.pembi.net%2Fpswgen-for-windows-now-available&amp;title=PswGen%20for%20Windows%20now%20available%21&amp;annotation=%0D%0AIf%20you%20can%27t%20be%20bothered%20with%20Python%2C%20don%27t%20trust%20the%20web%20service%2C%20and%20can%27t%20wait%20for%20Ken%20to%20finish%20the%20FireFox%20add-on...%20Now%20available%20on%20the%20PswGen%20page." title="Google Bookmarks"><img src="http://blog.pembi.net/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.pembi.net/pswgen-for-windows-now-available/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Project Natal : Jaw-droppingly-awesome</title>
		<link>http://blog.pembi.net/project-natal-jaw-droppingly-awesome</link>
		<comments>http://blog.pembi.net/project-natal-jaw-droppingly-awesome#comments</comments>
		<pubDate>Thu, 11 Jun 2009 07:53:24 +0000</pubDate>
		<dc:creator>Ken</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://blog.pembi.net/project-natal-jaw-droppingly-awesome</guid>
		<description><![CDATA[OMG Microsoft is gonna rule the world! Link from your social page:]]></description>
			<content:encoded><![CDATA[<p>OMG Microsoft is gonna rule the world!</p>
<p><object width="540" height="328"><param name="movie" value="http://www.youtube.com/v/M9nuwsQ5nF4&#038;hl=en&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/M9nuwsQ5nF4&#038;hl=en&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="540" height="328"></embed></object></p>

<div class="sociable">
<div class="sociable_tagline">
Link from your social page:
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fblog.pembi.net%2Fproject-natal-jaw-droppingly-awesome&amp;t=Project%20Natal%20%3A%20Jaw-droppingly-awesome" title="Facebook"><img src="http://blog.pembi.net/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fblog.pembi.net%2Fproject-natal-jaw-droppingly-awesome&amp;t=Project%20Natal%20%3A%20Jaw-droppingly-awesome" title="MySpace"><img src="http://blog.pembi.net/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://twitter.com/home?status=Project%20Natal%20%3A%20Jaw-droppingly-awesome%20-%20http%3A%2F%2Fblog.pembi.net%2Fproject-natal-jaw-droppingly-awesome" title="Twitter"><img src="http://blog.pembi.net/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fblog.pembi.net%2Fproject-natal-jaw-droppingly-awesome&amp;title=Project%20Natal%20%3A%20Jaw-droppingly-awesome&amp;annotation=OMG%20Microsoft%20is%20gonna%20rule%20the%20world%21%0D%0A%0D%0A" title="Google Bookmarks"><img src="http://blog.pembi.net/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.pembi.net/project-natal-jaw-droppingly-awesome/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Python: simple elegance</title>
		<link>http://blog.pembi.net/python-simple-elegance</link>
		<comments>http://blog.pembi.net/python-simple-elegance#comments</comments>
		<pubDate>Mon, 04 May 2009 18:34:16 +0000</pubDate>
		<dc:creator>Ken</dc:creator>
				<category><![CDATA[Reviews]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[Web Sites]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://blog.pembi.net/python-simple-elegance</guid>
		<description><![CDATA[A little hobby-job took me down the Python route this weekend, and I have to say I&#8217;m impressed. So far, at least. It has a simple elegance, and seems to approach coding from the same angle I do. Feels very natural to me. Pascal is my native tongue, and I&#8217;ve coded there for so long [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.pembi.net/python-simple-elegance"><img src="http://blog.pembi.net/wp-content/uploads/2009/05/python.gif" alt="python" title="python" width="211" height="71" class="alignright size-full wp-image-594" /></a>A little hobby-job took me down the Python route this weekend, and I have to say I&#8217;m impressed. So far, at least. It has a simple elegance, and seems to approach coding from the same angle I do. Feels very natural to me. Pascal is my native tongue, and I&#8217;ve coded there for so long I that the language itself doesn&#8217;t even seem to be there any more, the code almost flows out of my fingers. Every other environment I&#8217;ve dabbled in has felt foreign in some way, and that hasn&#8217;t happened here.<br />
<span id="more-573"></span><br />
OK for sure I spend some time rifling through the various online references to look up a function or syntax I haven&#8217;t used yet (to be expected in any new language), but it seems more exciting than tedious. Perhaps because this is a hobby-job and not something I <em>have </em>to do? Maybe that&#8217;s a factor.</p>
<p>Want to see a sample? OK here goes. Some time ago I wrote a password-generator program, which would take five inputs:</p>
<ul>
<li>Site/Service Name</li>
<li>User Name</li>
<li>Secret Word</li>
<li>Secret Number</li>
<li>Password Length</li>
</ul>
<p>and mash the first four together to create a random-looking, but predictably-reproducable (is that a word?) password of the requested length. I have a Windows desktop application (written in Delphi) and a Windows Mobile implementation (in VB) of this, and it has served me well. At least, until I upgraded my phone to a Symbian-based Nokia, at which point I lost the mobile version. And I miss that mobile one, so I decided to right this wrong. Python is available for just about every platform going, Java is so cliché, and although I can code in C/C++, I generally prefer not to (now <em>there&#8217;s</em> a foreign-feeling environment). Here&#8217;s the (very early pre-release-test-only-please-don&#8217;t-criticise-it) Python program:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #483d8b;">&quot;&quot;&quot;Main executive for Ken's password generator.
Just a test shell at the moment, but will incorporate cross-platform
checking, ensuring the correct I/O bits are used.
&quot;&quot;&quot;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">import</span> PswGenCalc
&nbsp;
a=<span style="color: #483d8b;">&quot;myname&quot;</span>
b=<span style="color: #483d8b;">&quot;anysite&quot;</span>
c=<span style="color: #483d8b;">&quot;keyword&quot;</span>
d=<span style="color: #483d8b;">&quot;1234&quot;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">print</span> PswGenCalc.<span style="color: black;">getPswGen</span><span style="color: black;">&#40;</span>a,b,c,d,<span style="color: #ff4500;">10</span><span style="color: black;">&#41;</span></pre></div></div>

<p>Of course that&#8217;s useless unless we&#8217;ve actually got the PswGenCalc module:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #483d8b;">&quot;&quot;&quot;The guts of Ken's password generator.
&nbsp;
   Takes the four input strings:
     SiteName
     UserName
     KeyWord
     KeyNumber
   And generates a repeatably-derived but high-strength and random-looking password.
&nbsp;
   Input strings are all upper-cased before hashing. Returned string is built from the
   collision-resistant constant named ANTICOL below. Note the omission of look-alike
   characters such as I, l and 1.
&quot;&quot;&quot;</span>
&nbsp;
ANTICOL = <span style="color: #483d8b;">&quot;234679ACDEFGHJKLMNPQRTUVWXYabcdefghijkmnpqrstuvwxyz!$^*()-+=@#.,~&quot;</span>
HEXDIGITS = <span style="color: #483d8b;">&quot;0123456789ABCDEF&quot;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">import</span> hashlib
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> getPswGen<span style="color: black;">&#40;</span>SiteName, UserName, KeyWord, Number, Length=<span style="color: #ff4500;">8</span><span style="color: black;">&#41;</span>:
    <span style="color: #808080; font-style: italic;"># first concatenate all inputs &amp; bump to upper-case</span>
    AllInOne = <span style="color: black;">&#40;</span>SiteName + UserName + KeyWord + Number<span style="color: black;">&#41;</span>.<span style="color: black;">upper</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
    <span style="color: #808080; font-style: italic;"># and generate a hash on that lot.</span>
    Hash = hashlib.<span style="color: black;">sha512</span><span style="color: black;">&#40;</span>AllInOne<span style="color: black;">&#41;</span>.<span style="color: black;">hexdigest</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>.<span style="color: black;">upper</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
    <span style="color: #808080; font-style: italic;"># The Hash just generated consists of a number of hex-pair values.</span>
    <span style="color: #808080; font-style: italic;"># Now strip them out one at a time and use them as indexes to look up</span>
    <span style="color: #808080; font-style: italic;"># password characters from the ANTICOL table.</span>
    Passw = <span style="color: #483d8b;">&quot;&quot;</span>
    <span style="color: #ff7700;font-weight:bold;">while</span> <span style="color: black;">&#40;</span><span style="color: #008000;">len</span><span style="color: black;">&#40;</span>Hash<span style="color: black;">&#41;</span> <span style="color: #66cc66;">&gt;</span> <span style="color: #ff4500;">0</span><span style="color: black;">&#41;</span>:
        HexVal = Hash<span style="color: black;">&#91;</span>:<span style="color: #ff4500;">2</span><span style="color: black;">&#93;</span>   <span style="color: #808080; font-style: italic;"># first two characters</span>
        <span style="color: #808080; font-style: italic;"># Now convert that to a decimal.</span>
        DecVal = <span style="color: black;">&#40;</span>HEXDIGITS.<span style="color: black;">find</span><span style="color: black;">&#40;</span>HexVal<span style="color: black;">&#91;</span>:<span style="color: #ff4500;">1</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span> <span style="color: #66cc66;">*</span> <span style="color: #ff4500;">16</span><span style="color: black;">&#41;</span> + HEXDIGITS.<span style="color: black;">find</span><span style="color: black;">&#40;</span>HexVal<span style="color: black;">&#91;</span><span style="color: #ff4500;">1</span>:<span style="color: black;">&#93;</span><span style="color: black;">&#41;</span>
        <span style="color: #808080; font-style: italic;"># Next use each value as an offset into the ANTICOL string, and look</span>
        <span style="color: #808080; font-style: italic;"># up the next password character.</span>
        Passw = Passw + ANTICOL<span style="color: black;">&#91;</span>DecVal <span style="color: #66cc66;">%</span> <span style="color: #008000;">len</span><span style="color: black;">&#40;</span>ANTICOL<span style="color: black;">&#41;</span><span style="color: black;">&#93;</span>
        <span style="color: #808080; font-style: italic;"># Drop the bit of the hash code we just used and loop around for the next.</span>
        Hash = Hash<span style="color: black;">&#91;</span><span style="color: #ff4500;">2</span>:<span style="color: black;">&#93;</span> <span style="color: #808080; font-style: italic;"># everything EXCEPT the first two characters</span>
    <span style="color: #808080; font-style: italic;"># Return the requested length of password, but from the TAIL of the string.</span>
    <span style="color: #808080; font-style: italic;"># Using the tail effectively includes the length in the &quot;randomisation&quot;.</span>
    <span style="color: #ff7700;font-weight:bold;">return</span> Passw<span style="color: black;">&#91;</span>-Length:<span style="color: black;">&#93;</span></pre></div></div>

<p>Yes, I know that I could have combined some of the statements above and made it perform a little faster, but I generally avoid doing that unless the performance gain is absoltely necessary &#8211; I&#8217;ll take readability over technical snobbery every time, thank you. And yes, I&#8217;m sure that there&#8217;s a library function somewhere to do the hex-to-decimal conversion for me too. When I come across it, I&#8217;ll update. For now it&#8217;s no hardship for me to write a one-line conversion calculation.</p>
<p>Back to the program in question: for the sample data supplied in the main program code above, the output password is &#8220;E^gTHm-&#038;Tr&#8221;. As passwords go, this is pretty good. Ten characters is long enough for most personal uses, and the mixture of upper-case and lower-case letters along with digits and symbols makes it very strong. To demonstrate how good the SHA hashing process is, I changed the KeyNumber parameter from 1234 to 1235, and the resulting password was &#8220;^?< ]>i2KEh&#8221; &#8211; <em>completely</em> unrelated. This is a sign of a good hash &#8211; change one bit of input data and on average, half the bits of the output data will change. The neat thing is, the password looks like total garbage but isn&#8217;t actually random. Give the same set of inputs to this code &#8211; on ANY operating system &#8211; and you&#8217;ll get the same output every time. That makes it ideal for password generation &#8211; you don&#8217;t have to remember the passwords, just the input components. And the beauty of it, like any decent hashing or encryption process, is that the entire design can be made public (like I&#8217;ve just done) without weakening the value. It doesn&#8217;t <em>matter</em> if the bad guys know how this works, as long as I keep the inputs secret, the passwords are safe. In fact, I really only need to keep ONE of the inputs secret, but there&#8217;s no harm in taking it further.</p>
<p>Is that strong enough? Frankly, yes &#8211; for low-to-medium-risk applications. Since you don&#8217;t have to remember the passwords, make them longer if you&#8217;re worried. If you need more security strength than this, then you&#8217;re really outside the bounds of what a password can do for you, and should be looking into multi-factor authentication anyway.</p>
<p>So why do I like Python so very much?</p>
<ol>
<li>It is extremely portable, Python code can run just about anywhere. Any flavour of desktop you can think of (and possibly a couple you can&#8217;t), non-graphical UI environments (text-only consoles), mobile devices (including Windows Mobile and Symbian-based phones), web servers, you name it.</li>
<li>The language seems to be implemented with the mind-set of programmers in mind. Rather than theoretical eggheads. I can&#8217;t explain what makes me think this, other than my immediate comfort-zone feeling.</li>
<li>It runs both as a prepared-script program and interactively, making unit-testing and debugging extremely convenient.</li>
<li>Silly issues like indenting conventions disappear &#8211; they are an integral part of how the language operates. If you get your indenting wrong, you&#8217;ll know all about it soon enough. Nudges the programmer into good design and coding habits.</li>
<li>To a much larger extent than any other environment I&#8217;ve worked in, Python encourages code self-documentation. You noticed the triple-quoted headers on each file above? That&#8217;s a Python convention, and that text is picked up by the doc-generator utilities.</li>
<li>Code is readable! You might have picked up from the above that Python is heavily object-oriented. Fortunately, this is object orientation done right. Simple dot notation, thank you very much. Again, this just encourages good habits.</li>
</ol>
<p>And now if you&#8217;ll excuse me, I&#8217;m off to turn this into a functional application. A desktop one quickly for myself, then a Symbian one for the Nokia, followed by a web-based version for the rest of the world. Any other requests?</p>

<div class="sociable">
<div class="sociable_tagline">
Link from your social page:
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fblog.pembi.net%2Fpython-simple-elegance&amp;t=Python%3A%20simple%20elegance" title="Facebook"><img src="http://blog.pembi.net/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fblog.pembi.net%2Fpython-simple-elegance&amp;t=Python%3A%20simple%20elegance" title="MySpace"><img src="http://blog.pembi.net/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://twitter.com/home?status=Python%3A%20simple%20elegance%20-%20http%3A%2F%2Fblog.pembi.net%2Fpython-simple-elegance" title="Twitter"><img src="http://blog.pembi.net/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fblog.pembi.net%2Fpython-simple-elegance&amp;title=Python%3A%20simple%20elegance&amp;annotation=A%20little%20hobby-job%20took%20me%20down%20the%20Python%20route%20this%20weekend%2C%20and%20I%20have%20to%20say%20I%27m%20impressed.%20So%20far%2C%20at%20least.%20It%20has%20a%20simple%20elegance%2C%20and%20seems%20to%20approach%20coding%20from%20the%20same%20angle%20I%20do.%20Feels%20very%20natural%20to%20me.%20Pascal%20is%20my%20native%20tongue%2C%20a" title="Google Bookmarks"><img src="http://blog.pembi.net/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.pembi.net/python-simple-elegance/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
