Rate password length

- In this movie, we want to improve…our password rating function by adding points based…on the length of the password.…And you'll remember, from the opening movie in this chapter,…we talked about how the length matters exponentially more…than the size of the character sets.…I think that we should be generous with the points here.…My plan is to add two points if we get to eight characters.…We don't want to reward them for anything less than eight.…Eight is a good starting point for a secure password…but we'll give them two points once they get there.…And then every character after that exponentially increases…the strength of the password.…

So, we're going to give them another half point…for every character they add after that.…So, in order to do this, the first thing we need…to do is figure out the password length.…So, let's do that using strlen,…call that on the password.…Once we know the length, then we can check to see…whether or not it's eight characters or more.…So, if the length >= 8,…then we want to add two points,…

Resume Transcript Auto-Scroll

Author

Released

12/23/2015

This installment of Easy PHP Projects shows how to create password generators and strength meters for PHP websites and applications. Like other courses in the series, it presents small-scale PHP projects for PHP beginners and experienced developers looking to practice their skills. Series author Kevin Skoglund shows how to build a password generator that randomizes strings; a more user-friendly generator that combines random dictionary words and numbers; and a color-coded strength meter that tests passwords on factors such as character variation and length.