• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
MeNeedz Password

#21
[eluser]Pinkiee[/eluser]
Just quickly, it now can add up to 105 (I think, but I could be wrong).

#22
[eluser]Pinkiee[/eluser]
Looking much better though, thank you.

#23
[eluser]davidbehler[/eluser]
Code:
if ($password_length > 0)
        {
            $_points += 5;

            if($password_length >= 5)
            {
                $_points += 10;

                if($password_length >= 7)
                {
                    $_points += 25;
                }
            }
        }
        // lower case
        if($lower_case_count > 0)
        {
            $_points += 10;
        }

        // upper case
        if($upper_case_count > 0)
        {
            $_points += 10;
        }

        // numeric
        if($numeric_count > 0)
        {
            if ($numeric_count <= 2)
            {
                $_points += 10;
            }
            else
            {
                $_points += 20;
            }
        }

        // special characters
        if ($special_count > 0)
        {
            if ($special_count == 1)
            {
                $_points += 10;
            }
            else
            {
                $_points += 25;
            }
        }
Up to 25 for length, 10 for lower case, 10 for upper case, up to 20 for numeric and up to 25 for special characters...that's 85 points max.
There was an additional section where one could earn up to 5 additional points.

85 + 5 = 90 points to get a "Very secure" rating. You can't reach that right now but I guess that's ok.

#24
[eluser]Pinkiee[/eluser]
its up to 40 for length.

If you have a password of 10 characters, you will get 5 points for having a password, 10 points fo it being over a length of 5 and 25 points for it being ofer a length of 7.

5+10+25=40

If you have a look at the original example I put up, The values were changed (5+5+15), I am sorry I shoudl have commented the code better and pointed out the changes so you could easly make the changes.

You can either change it to an "else if"/switch with out a break or keep it the same and adjust the values.

Code:
switch($password_length) {
    case ($password_length > 0):
        $_points += 5;
    case ($password_length >= 5):
        $_points += 5;
    case ($password_length >= 7):
        $_points += 15;
        break;
}

Hope that helps. Ive only had to edit this file about five times to fix spelling.

#25
[eluser]davidbehler[/eluser]
Damn, u are absolutly right!

It took me some time but I finally found the page where I found the rating system: http://www.codeandcoffee.com/2007/07/how...oogle-v20/

I adjusted the helper to better reflect the proposed rating and fixed the amount of points one can get for the length.

Again thanks for your help!

#26
[eluser]Sbioko[/eluser]
I have library like this. I wrote it myself. Does your library checks for &, ?, !, %, $ and other symbols in strength checking?

#27
[eluser]davidbehler[/eluser]
Sure I do. I check for upper case, lower case, numbers and special character

#28
[eluser]Sbioko[/eluser]
Well done :-)


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.