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 to find the sum of a Series 1/1! + 2/2! + 3/3! + 4/4! +.......+ n/n!
- C++ Program for Stooge Sort
- C++ Program for Topological Sorting
- Program to check for ISBN
- C++ Program for Pigeonhole Sort
- C++ Program for Cocktail Sort
- C++ Program for Comb Sort
- Program to find the initials of a name.
- C++ Program for Cycle Sort
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. 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.