By Sagar Naskar
This java program checks whether the password satisfies the conditions of a password and the strength of the password
This Java program takes a string input as the password that will be checked.
Input- String password
Output- Displays the validity of the password. Prints "Password valid!" if the string satisfies all conditions of a valid password and displays the strength of the password. ; Else prints "Password invalid!" and displays what is missing. ; In case password shorter than 8 characters, displays the validity as well as suggests stronger password in case other conditions are satisfied.
This program checks each character of the string and punches a counter integer after checking its ASCII value. In case of a minimum 1 lower-case, 1 upper-case, 1 number and 1 special character being present it deems the password to be valid and displays it to be valid along with the strength of the password. In case any 1 or more of these are absent the program displays it to be invalid and tells the user what is missing. In case the password is valid but the length is shorter than 8 characters, it tells us that the password is valid but too weak.
Submitted by Sagar Naskar (sagarN)
Download packets of source code on Coders Packet