Question: Write a C + + program called Password that handles encrypting a password. The program must perform encryption as follows: main method Ask the user

Write a C++ program called Password that handles encrypting a password.
The program must perform encryption as follows:
main method
Ask the user for a password.Sends the password to a boolean function called isValidPassword to check validity.
Returns true if password is at least 12 characters longReturns false if it is not at least 12 characters long
If isValidPassword functions returns false
Print the following error message The password must be at least 12 characters long.Loop and ask for password again and recheck it.
If isValidPassword returns true then continue.Ask the user for a keySend key to a boolean function called isValidKey.
Returns true if key is between 1 and20(inclusiveReturns false if not between 1 and 20(inclusive)
If isValidKey returns false, then print the following error message and ask for the password again and recheck it.
The key must be between 1 and 20, you entered is X.(X is the number entered)
If isValidKey returns true continue.
Send the password to function called encrypt that
Encrypts password using the formula below. Returns a string representing the encrypted password.
Display the password and the encrypted password in a nicely formatted String such as:
Your password is givemeaccess the encrypted version of your password isoq~mumikkm{{with a key of 8

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 Programming Questions!