<?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>EeepZork!&#187; AJAX</title>
	<atom:link href="http://labs.elektrikcoma.com/blog/tag/ajax/feed/" rel="self" type="application/rss+xml" />
	<link>http://labs.elektrikcoma.com/blog</link>
	<description>The unofficial offical comaLABS blog.</description>
	<lastBuildDate>Fri, 06 Nov 2009 07:24:34 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>password strength script, yet another one.</title>
		<link>http://labs.elektrikcoma.com/blog/code/password-strength-script-yet-another-one/</link>
		<comments>http://labs.elektrikcoma.com/blog/code/password-strength-script-yet-another-one/#comments</comments>
		<pubDate>Fri, 13 Feb 2009 20:02:17 +0000</pubDate>
		<dc:creator>Mikael C. Fritts</dc:creator>
				<category><![CDATA[AJAX]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Web App]]></category>

		<guid isPermaLink="false">http://labs.elektrikcoma.com/blog/?p=13</guid>
		<description><![CDATA[As a freelancer I get all kinds of requests for all kinds of scripts, most involving security of some sort, but what amazes me is that most of these people never ask for a password strength script. Maybe they have their own solution, maybe they&#8217;re just not thinking about it or don&#8217;t see the necessity. [...]]]></description>
			<content:encoded><![CDATA[<p>As a freelancer I get all kinds of requests for all kinds of scripts, most involving security of some sort, but what amazes me is that most of these people never ask for a password strength script. Maybe they have their own solution, maybe they&#8217;re just not thinking about it or don&#8217;t see the necessity. </p>
<p>In today&#8217;s day and age, I think it should be mandatory to keep your data as secure as possible, yes I&#8217;m pointing out the obvious over here. No matter what kind of security you implement on your side, your user can be the biggest threat to you in the end. How many people are using &#8220;password&#8221; or &#8220;suzan&#8221; as their password. You can limit this kind of behavior and also bring to your users attention the fact that, yes a familiar password is easy to remember, but it is just as easy to crack. </p>
<p>So here is a simple script that implements AJAX and jQuery to display a nice password strength meter for user when signing up. Geek out continues below.</p>
<p>> This is a very small plugin for jQuery.<br />
> Naturally, jQuery is required to run it. You can download jQuery <a href="http://jquery.com/" target="_blank">HERE</a> and of course it&#8217;s free.</p>
<p>Now let&#8217;s get into the meat of this already, shall we?</p>
<p>First up, you&#8217;re going to need the JavaScript files from <a href="http://labs.elektrikcoma.com/blog/wp-content/uploads/pw_checker.rar">HERE</a>. Unpack the files and upload to the proper directory on your server. Eeezzee peezzzyyy!</p>
<p>Now you need to insert the following code anywhere BEFORE the password field on your page.<br />
<code><br />
&lt;script type="text/javascript" src="js/jquery.js"&gt;&lt;/script&gt;  // make sure you adjust your path!<br />
&lt;script type="text/javascript" src="js/jquery.pstrength-min.1.2.js"&gt;<br />
&lt;/script&gt;<br />
&lt;script type="text/javascript"&gt;<br />
$(function() {<br />
$('.password').pstrength();<br />
});<br />
&lt;/script&gt;<br />
</code></p>
<p>Insert the class &#8220;password&#8221; into the dialogue box so we know it&#8217;s identified as a password box. Example:<br />
<code><br />
&lt;INPUT class="password" type=password name="Password"&gt;<br />
</code></p>
<p>Now for the last step, adding new tags to your existing CSS file. Something like this should do the trick, but you can change as you see fit.<br />
<code><br />
.password {<br />
font-size : 12px;<br />
border : 1px solid #000000;<br />
width : 200px;<br />
font-family : Verdana, Arial, Helvetica, sans-serif;<br />
}<br />
.pstrength-minchar {<br />
font-size : 10px;<br />
}<br />
</code></p>
<p>And there you have it! All done. You can change a few settings inside jquery.pstrength-min.1.2.js, such as messages, length/height of the bar, etc&#8230; just make sure you know what you&#8217;re playing with!!!<br />
<code><br />
<script type="text/javascript" src="http://labs.elektrikcoma.com/jquery.js"></script><br />
<script type="text/javascript" src="http://labs.elektrikcoma.com/jquery.pstrength-min.1.2.js">
</script><br />
<script type="text/javascript">
$(function() {
$('.password').pstrength();
});
</script><br />
<font color="#990000">EXAMPLE:</font><br />
Password:</p>
<input class="password" name="Password" size="20" type="password"/>
</code></p>
<p><font color="#990000">Ed. Note: </font> Try using common passwords like &#8220;pass&#8221; &#8220;password&#8221; &#8220;love&#8221; &#8220;sex&#8221; &#8220;1234&#8243;, etc.. and see what happens. Common phrases like these can be included in the jquery.pstrength-min.1.2 JavaScript file.</p>
]]></content:encoded>
			<wfw:commentRss>http://labs.elektrikcoma.com/blog/code/password-strength-script-yet-another-one/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
