Question: c + + Password Manager Program Write a class called UserPasswordManager that contains the following: Private Data: Boolean value for a valid password, a string

c++Password Manager Program
Write a class called UserPasswordManager that contains the following:
Private Data:
Boolean value for a valid password, a string for the current password, and a vector of strings for old passwords. You will not store any passwords, current or old, that are not encrypted.
Private Functions:
createPassword(): This function will ask the user for a password, send it to a validatePassword () function and if it is a valid password, send the password to an encryptPassword() function that will return the current encrypted password to be stored.
validatePassword(): This function will check the password to make sure that it adheres to the following rules:
Must contain at least 8 characters.
Must contain at least one lowercase letter.
Must contain at least one uppercase letter.
Must contain at least one digit.
Must contain at least one of the following special characters:
! @ # $ % ~ %^ & *()_+=-`<>? : "|\[]{}
Any other special characters (including spaces) are NOT allowed.
Must NOT be a previously used password.
encryptPassword(): This function takes in a valid password and encrypts it using the following encryption scheme:
For any upper-case letters, you will sum the decimal values of the letters and then use the total to create a number in a range of values 126(similar to ranging the rand() numbers). This value will then be the offset for your upper-case letters.
For lower-case letters, you will sum the decimal values of the letters and then use the total to create a number in a range of values 126(similar to ranging the rand() numbers). This value will then be the offset for your lower-case letters. (Notice it is the same thing you did for uppercase)
For digits, you will sum the decimal values of the digits and then use the total as you would to create a number in a range of values 09(similar to ranging the rand() numbers). This value will then be the offset for your digits.
Upper-case, lower-case, and digits all should have their own offsets.
You will then use your offsets as you go through each character in your password and offset (add to) its value by your calculated offset. Be sure to wrap as necessary. (e.g. If you had the letter h and the offset was 13, then the encrypted letter would be u. If you had the letter P with an offset of 13 then your encrypted letter would be c having to wrap when it gets to the end of the alphabet.
There is no offset for special characters. Special characters do not change in the encryption.
Once you have the new encrypted string, you will then add 5 numeric digits to the beginning of the string in the following format: first two digits are the upper-case offset, the next two digits are the lowercase offset, and the last digit is the offset for the digit. (This can be used later to decrypt the password however not in this assignment!)
The final combined encrypted string is to be returned.
Public functions:
Default constructor: That will call the createPassword() function and use the Boolean value to either display Password Created or Password could not be created
changePassword(): This function will ask the user for a new password. This new password will have to be validated. If the new password is valid, then the old encrypted password will be added to the old passwords vector and a message stating that Password was successfully changed will be returned or if the new password is not valid, then a message stating, Password was not changed will be returned.
verifyPassword(): This function will accept a password to verify. You will have to encrypt this password using your function in order to compare it to the current encrypted password. This function will either return a true or false Boolean value.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!