DO THIS FOR ME
2IB/G/Jun18/8520/CA/CB/CC/CD/CEPassword Checker and GeneratorA program needs to be created that allows the user to check the strength of passwords and to generate strong passwords.The program should check the strength of a password based on a point-scoring system. When a password is entered,points are awarded based on the length of the password and the types of characters contained within the password. Points are deducted if characters are used in a limited way.The program should also be able to generatea password that, when checked for strength, is classified as a strong password.The program should work in the following way:1A menu is displayed allowing the user to select from the following options:Check PasswordGenerate PasswordQuit.2If the user selects the 'Check Password' option:they are asked to enter a password if the length of the entered password is less than 8 characters or greater than 24 characters then an appropriate error message is displayed and the user returned to the menuthe program checks that the password entered only contains allowed characters. The allowed characters are:i.upper case letters (Ato Z)ii.lower case letters (ato z)iii.digits (0to 9)iv.allowed symbols (see Figure 1).If the password contains a character that is not allowed then an appropriate error message is displayed and the user returned to the menu. Figure 1The allowed symbols are:! $ % ^ & * ( ) -_ = +The space character is notallowed.
3IB/G/Jun18/8520/CA/CB/CC/CD/CETurn over ►3A point score is calculated for the entered password. The score is set to the length of the password. For example, if the password is 12 characters in length then the score is set to 12.Points are added for the following:if the password contains at least one upper case letter (Ato Z) then 5 points are added to the scoreif the password contains at least one lower case letter (ato z) then 5 points are added to the scoreif the password contains at least one digit (0to 9) then 5 points are added to the scoreif the password contains at least one of the allowed symbols shown in Figure 1 then 5 points are added to the scoreif the password contains at least one upper case letter (Ato Z) andat least one lower case letter (ato z) andat least one digit (0to 9) andat least one allowed symbol shown in Figure 1, then an additional 10 points are added to the score.Points are subtracted for the following:if the password onlycontains upper and lower case letters (Ato Zand ato z) then 5 points aresubtracted from the scoreif the password onlycontains digits(0to 9)then 5 points are subtracted from the scoreif the password onlycontains allowed symbolsas shown inFigure 1 then 5 points are subtracted from the scoreif the password contains three consecutive letters based on the layout of a UK QWERTY keyboard (see Figure 2) then 5 points are subtracted from the score for each set of three.Figure 2When looking for sequences of three consecutive letters, the case of the letters does not matter. For example, QWEwould be the same sequence as QwEor qwe. The password must be checked against each row of letters separately. Examples of sequences are shown in Figure 3.
4IB/G/Jun18/8520/CA/CB/CC/CD/CEFigure 3Example sequenceExplanationtYuThree letters are next to each other on the top row of the QWERTY keyboard, therefore 5 points are subtracted from the score of any password that contains this sequence.asdFGFive letters are next to each other on the second row of the QWERTY keyboard. In this case there are three sets of three consecutive alphabetic letters: asd, sdF, and dFG, therefore 15 points are subtracted from the score of any password that contains this sequence.ZxcTyuiThree letters are next to each other on the bottom row of the QWERTY keyboard, Zxc. Four letters are next to each other on the top row of the QWERTY keyboard, Tyui. This gives three sets of consecutive letters: Zxc, Tyuand yui, therefore 15 points are subtracted from the score of any password that contains this sequence.4The point score is then used to determine if the password strength is weak, medium or strong. If the point score is over 20 then the password is strong. If the point score is zero or less then the password is weak. The password strength and the point score should be displayed to the user. The user should then be returned to the menu.5If the user selects the 'Generate Password' option:a)the program generates a random number between 8 and 12 inclusive. This number will be the length of the passwordb)the program then generates a random sequence of characters using letters, digits and/or allowed symbols to create a password of the length set in a)c)the point score for the password is then calculated (in the same way as for a user-enteredpassword)d)parts a)to c)should be repeated until the password strength is stronge)the generated password and point score should then be displayed and the user returned to the menu.6If the user selects the 'Quit' option then a suitable message should be displayed and the program ends.
5IB/G/Jun18/8520/CA/CB/CC/CD/CEThe following examples show how the 'Check Password' option should work.EXAMPLE 1Entered password: aSD7V^&*gS77+Initial scorePointsLength is 1313AdditionsPointsAt least one upper case character (S, Dand V)5At least one lower case character (aand g)5At least one symbol (^and &and *and +)5At least one digit (7)5One of each of the above types10SubtractionsPointsSequence of letters (aSD)–5Point score for password aSD7V^&*gS77+is 13 + 30 –5 = 38 so this is a strong password.EXAMPLE 2Entered password: qwerty123Initial scorePointsLength is 99AdditionsPointsAt least one lower case character (q, w, e, r, tand y)5At least one digit (1, 2and 3)5SubtractionsPointsConsecutive alphabetic characters (qwe, wer, ertand rty)–20Point score for password qwerty123is 9 + 10 –20 = –1 so this is a weak password.