Given a password, we have to categorize it as a strong or weak one. There are some checks that need to be met to be a strong password. For a weak password, we need to return the reason for it to be weak.
Conditions to be fulfilled are:
Minimum 9 characters and maximum 20 characters.
Cannot be a newline or a space
There should not be three or more repeating characters in a row.
The same string pattern(minimum of two character length) should not be repeating.
In this program, we will be taking a password as a combination of alphanumeric characters along with special characters, and check whether the password is valid or not with the help of few conditions.
Primary conditions for password validation :
Minimum 8 characters.
The alphabets must be between [a-z]
At least one alphabet should be of Upper Case [A-Z]