Encrypter- I need help
Ok. I'm posting this mainly because of just an utter lack of topics in the C++ forum and zeco is about to go crazy from boredom xD, and also because after much trial and error I still can't quite get my XOR encrypter to work.
What it's supposed to do:
1. Take a Message
2. Take a key
3. Encrypt the message with the key
4. Print out the Encrypted message.
Problem:
My problem is that you can't copy and paste the message back in the gui. the console window just doesnt allow you to paste. D: I need a way people can paste the code back in the gui. I need for the program to read the message from a .txt file so I can easily edit (copy and paste) messages
I was planing to release it as a little present so we could send encrypted messages to each other :P. Guess I'll just have to release it half finished.
Here's the source code for the Encrypter and the Encrypt.exe:
What it's supposed to do:
1. Take a Message
2. Take a key
3. Encrypt the message with the key
4. Print out the Encrypted message.
Problem:
My problem is that you can't copy and paste the message back in the gui. the console window just doesnt allow you to paste. D: I need a way people can paste the code back in the gui. I need for the program to read the message from a .txt file so I can easily edit (copy and paste) messages
I was planing to release it as a little present so we could send encrypted messages to each other :P. Guess I'll just have to release it half finished.
Code:
#include <iostream>
using namespace std;
int main()
{
char key;
char str[9000];
cout << "Enter the message you want to encrypt: "<<endl;
cin >> str;
cout << "Enter your encryption key(any character): ";
cin >> key;
for(int i = 0;str[i]; i++)
{
str[i] = str[i] ^ key;
}
cout << "\nHere is your encrypted message: \n" << str << endl << "\n use key of: " << key << " to decode.\n";
system("pause");
return 0;
}
Encrypter.rar


