Given a password entered by the user, check its strength and suggest some password if it is not strong.
Criteria for strong password is as follows :
A password is strong if it has :
1. At least 8 characters
2. At least one special char
3. At least one number
4. At least one upper and one lower case char.
Input : keshav123 Output : Suggested Password k(eshav12G3 keshav1@A23 kesh!Aav123 ke(shav12V3 keGshav1$23 kesXhav@123 keAshav12$3 kesKhav@123 kes$hav12N3 $kesRhav123 Input :rakesh@1995kumar Output : Your Password is Strong
Check the input password for its strength if it fulfills all the criteria, then it is strong password else check for the absent characters in it, and return the randomly generated password to the user.
Suggested password geek@201K8 geek@201S8 gOeek@2018 geek@201N8 geek@2P018 geek@D2018 geUek@2018 geek@2Q018 geek@2F018 geekZ@2018
Time complexity : O(n).
- Program to check Strength of Password
- Generating OTP (One time Password) in PHP
- C++ Program for QuickSort
- C++ Program for ShellSort
- Program for n-th even number
- C Program for ID3 Tagging
- C++ Program for Sieve of Eratosthenes
- Reasons for a C++ program crash
- Program to check for ISBN
- C++ Program for Topological Sorting
- Wishing your Valentine with a Program!!
- C++ program for hashing with chaining
- Program to print the given Z Pattern
- Program to check if two strings are same or not
- Program to Encrypt a String using ! and @
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.