point scoring system
kiki2005 (5)

How would I make a code that would check the password for the following and add or subtract the following points :

  • the amount of characters is equal to the first amount of points
  • capital letters + 5 points
  • lower case letters +5 points
  • digits(1-9) + 5 points for each one
  • special characters(!$%^&*()_-+=) + 5 points
  • only capital letter -5 points
  • only lowercase letters -5 points
  • only digits -5 points
  • only special characters -5
  • if the password contains three consecutive letters based on the layout of the UK QWERTY keyboard -5 points for each set of three.

In addition I would also like to know how to generate a random password that follows the point scoring system above and has 8-12 letters.The password would have to be classified as strong to be shared with the user.
Password strengths

  • 20+ is strong
  • 0 or less is weak
  • anything else is medium
You are viewing a single comment. View All
kiki2005 (5)

@EchoCoding thank you so much for your help.the explanation on each line really helps me to understand each part of it as well.Thank you