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 characters longReturns false if it is not at least characters long
If isValidPassword functions returns false
Print the following error message The password must be at least 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 andinclusiveReturns false if not between and 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 and you entered is XX 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~mumikkmwith a key of
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
