User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 375,170 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,216 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 1407 | Replies: 1
Reply
Join Date: May 2006
Posts: 56
Reputation: kaushik259106 is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 0
kaushik259106 kaushik259106 is offline Offline
Junior Poster in Training

Help Password Strength

  #1  
Sep 5th, 2007
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
Last edited by ~s.o.s~ : Sep 5th, 2007 at 12:46 pm. Reason: Added code tags.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jan 2007
Posts: 2,433
Reputation: MidiMagic is on a distinguished road 
Rep Power: 6
Solved Threads: 99
MidiMagic's Avatar
MidiMagic MidiMagic is offline Offline
Nearly a Posting Maven

Re: Password Strength

  #2  
Sep 5th, 2007
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.
Daylight-saving time uses more gasoline
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb JavaScript / DHTML / AJAX Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum

All times are GMT -4. The time now is 11:51 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC