/* Author: Francesco Taurisano This algorithm uses the Caesar's cipher to create an encoded file from an original plaintext file. The secret key is read from the keyboard. */ #include #include using namespace std; int main() { char letter; int key; cout<<"Insert the secret key "; cin>>key; ifstream plaintext("c:/file1.txt"); ofstream ciphertext("c:/file2.txt"); while(plaintext.get(letter)) { ciphertext.put(letter+key); } plaintext.close(); ciphertext.close(); system("pause"); return 0; }