Hi friends,
The code i attached is used for checking password strength!. I have a html page which calls this.
Problem is if i change the following code
Code:
if (bCheckLowerCase)
{
strCheck = "abcdefghijklmnopqrstuvwxyz";
if (doesContain(strPassword, strCheck) > 0)
{
nCombinations += strCheck.length;
}
}
to
Code:
if (bCheckLowerCase)
{
strCheck = "a";
if (doesContain(strPassword, strCheck) > 0)
{
nCombinations += strCheck.length;
}
}
then also if i enter "abcde" the thing works..ie it then also works for all lowercase alphabets.. how does it do so..
also what does this part of code do..
Code:
// -- 500 tries per second => minutes
var nDays = ((Math.pow(nCombinations, strPassword.length) / 500) / 2) / 86400;
// Number of days out of password lifetime setting
var nPerc = nDays / nPasswordLifetime;
return nPerc;
Am worse in java so confused!
Please help!
link for my file : http://rapidshare.com/files/53549352...ength.zip.html
file size is 2kb