0

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

2
Contributors
1
Reply
2
Views
10 Years
Discussion Span
Last Post by MidiMagic
0

JavaScript is client-side. You are allowing the user's own computer to check his password.

And remember that a user can turn off JavaScript.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.