Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

File Encryption / Decryption Filter (All one program - Please do not have it in

ID: 3697103 • Letter: F

Question

File Encryption / Decryption Filter (All one program - Please do not have it in parts!)

Program Type: C++ ONLY

Use open source files (but not limited to)

#include <iostream>, #include <string>, #include <fstream> ...

The encryption program should work like a filter, reading the contents of one file, modifying the data into a code, and then writing the coded contents out to a second file. The second file will be a version of the first, but written in a secret code. Once the data is encrypted, the program should generate a password file to be used to decrypt the file in the future. The password should be saved into a third file.

To verify that the program works correctly, the program should also provide an alternative to decrypt the file. The decryption should read the contents of the secon file, restore the data to its original state, and display the file contents on screen. To strengthen the security of the decrypted file, the decryption portion of the program should require a user to enter a password. The program should read the password and compare it with the password stored in the third file created earlier. If the password is entered correctly, the content of the decryption file will be revealed on screen.

Explanation / Answer

//importing pacakages

#include <fstream>
#include <algorithm>
#include <iterator>
using namespace std;

struct Encrypting

{
char operator()(char c) const

{
return c-10;
}
};
int main()
{
ifstream in("input.txt");
ofstream out("output.txt");
transform(istreambuf_iterator<char>(in);
istreambuf_iterator<char>();
ostreambuf_iterator<char>(out);
Encrypting();

}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote