Question: Write a C++ program that implements the following two cases: Case 1: Encrypt files with certain extension using AES-CBC-256. Case 2: Decrypt encrypted files. Input
Write a C++ program that implements the following two cases: Case 1: Encrypt files with certain extension using AES-CBC-256. Case 2: Decrypt encrypted files. Input Format: The program should be executed using the following command format: project1 Where: 1. project1: is the name of the executable after compilation. 2. casenumber: should accept ONLY two possible values only: (1) for case 1 and (2) for case 2. Any other input should be rejected. 3. In case 1 you should use inputfile-key to encrypt all files (within the current directory) with the given extension using AES-CBC-256. 4. In case 2 you should decrypt all encrypted files using inputfile-key. Output Format: 1. If case 1 is selected, then: all the required files should be encrypted. If file file_name.ext is encrypted, then the new encrypted file should be named as file_name.ext.enc. The original file should be deleted, and a summary of encrypted file names should be printed on the terminal. 2. If case 2 is selected, then: all encrypted files should be decrypted, original file names should be restored, encrypted files should be deleted, and a summary of all file names should be printed on the terminal. Submission Guidelines: 1. Use openssl package through the command line. 2. Do NOT use salt.

. Write a C++ program that implements the following two cases: Case 1: Encrypt files with certain extension using AES-CBC-256. Case 2: Decrypt encrypted files. Input Format: The program should be executed using the following command format: project1 Where: 1. projectl: is the name of the executable after compilation. 2. casenumber: should accept ONLY two possible values only: (1) for case 1 and (2) for case 2. Any other input should be rejected. 3. In case 1 you should use inputfile-key to encrypt all files (within the current directory) with the given extension using AES-CBC-256. 4. In case 2 you should decrypt all encrypted files using inputfile-key. 5. IMPORTANT: If your program encrypts, deletes or corrupts anything else you will get ZERO. Output Format: 1. If case 1 is selected, then: all the required files should be encrypted. If file file name.ext is encrypted, then the new encrypted file should be named as file name.ext.enc. The original file should be deleted, and a summary of encrypted file names should be printed on the terminal. 2. If case 2 is selected, then: all encrypted files should be decrypted, original file names should be restored, encrypted files should be deleted, and a summary of all file names should be printed on the terminal. Submission Guidelines: 1. Use openssl package through the command line. 2. Do NOT use salt