CoreFiles by mySites.guru
password-strength-meter.dev.js21 lines, 719 bytes, from wordpress-2.9.zip
Raw History Compare with 2.8.6
md5
2072440d1515a541623bd1ef77373c12
sha1
f4b732c79249078cfc8c9dd411f9a23e4fd81dac
sha256
44b74d041632bc5f18c0ccad7fb556aefd1c0bab3c06d700cbd34b5e8066dcbb
// Password strength meter
function passwordStrength(password,username) {
    var shortPass = 1, badPass = 2, goodPass = 3, strongPass = 4, symbolSize = 0, natLog, score;

	//password < 4
    if (password.length < 4 ) { return shortPass };

    //password == username
    if (password.toLowerCase()==username.toLowerCase()) return badPass;

	if (password.match(/[0-9]/)) symbolSize +=10;
	if (password.match(/[a-z]/)) symbolSize +=26;
	if (password.match(/[A-Z]/)) symbolSize +=26;
	if (password.match(/[^a-zA-Z0-9]/)) symbolSize +=31;

	natLog = Math.log( Math.pow(symbolSize,password.length) );
	score = natLog / Math.LN2;
	if (score < 40 )  return badPass
	if (score < 56 )  return goodPass
    return strongPass;
}

The same content is in 23 releases, WordPress 2.8-beta1 to 2.9.2. See them all, or every version of this file.