Encrypt.exe

Posts 1–15 of 48 · Page 1 of 4
Encrypt.exe
Haha! eat it Dev-C++..
My Encryption program is now fully(73%) working!

Intructions:

Encrypt
1. Download all files into the same folder
2. Type the message you want to encrypt into encrypt.txt
3. The the encrypted text will be saved to decrypt.txt
4. Run Encrypt.exe
5. Type in a one character key (This key will be used to decrypt your message.)
6. Just open up decrypt.txt to view the encryption.
Decrypt
1. Copy and paste the code you want to decrypt into the encrypt.txt & save
2. Clear the decrypt.txt and save it. (you will need it clear to view the decrypted message)
3. Run Encrypt.exe
4. Type in the key used to decrypt the file.
5. Check decrypt.txt for the decrypted message.

Credits:
A freakin huge amount of credit goes to zeco for figuring out how to write and read files. Thanks zeco

Wo_Ot! lalakijilp got the secret message. Here is the source:
Code:
#include <iostream>
#include <fstream>
#include <string>
using namespace std;

void encrypt();
void decrypt();
void start();

int main()
{
    start();
    system("pause");
    return 0;
}

void start(){
    char choice;
    cout << "Would you like to encrypt, or Decrypt a file?\n" << endl;
    cout << "q.) Quit\n";
    cout << "e.) Encrypt/Decrypt\n";
    
    cin >> choice;


    switch(choice){
    case 'q':
        break;

    case 'e':
        system("cls");
        decrypt();
        system("cls");
        start();
        break;

    default:
        system("cls");
        start();
        break;
    }
}



void decrypt()
{
    fstream ifile;
    fstream efile;
    char key;
    string iput;
    ifile.open("encrypt.txt");
    efile.open("decrypt.txt");

    cout << "Place the text you want to decrypt or encrypt in the file 'encrypt.txt'"<<endl;
    if (ifile.is_open())            
    {
          cout << "What key is the input encrypted in?" << endl;
          cin >> key;                        
          while(!ifile.eof())
          {
           getline(ifile, iput);
           for(int i = 0; iput[i]; i++)
            {
             iput[i] = iput[i] ^ key;    
            }
            efile << iput;
            cout << iput;
          }
          ifile.close();
          efile.close();
    }
    cout << endl;
    system("pause");
}
I have also included the source in an attached .txt file

There is a sample message to decrypt included in the encrypt.txt file. the key is 'd'. Have fun!
Encrypter.rarattachment deleted · 27 downloads before removal
EncryptSource.txtattachment deleted · 14 downloads before removal
You saying I wrote up the other thing for nothing?

But nothing beats figuring out a programming problem yourself !
Quote Originally Posted by B1ackAnge1 View Post
You saying I wrote up the other thing for nothing?

But nothing beats figuring out a programming problem yourself !
Sry :P. I wouldn't say it was pointless. Don't get me wrong I would like to have seen it approximately 9 hours ago D: But I guess you just have bad timing. lol .

Don't worry I copy & pasted your code. I'm saving it for later. o_O no more coding for me tonight...
lol no worries.. that's the reason to post code here so people can copy & read & learn & improve etc..
Quote Originally Posted by B1ackAnge1 View Post
lol no worries.. that's the reason to post code here so people can copy & read & learn & improve etc..
I think I will work on a second version in a couple weeks because I want to learn more stuff before I just jump into making a second one.

BTW: I hope someone at least tries to decrypt my message. I know it's really hard to use, I need to make a GUI for it, but idk how to do that yet either...
The ugly Ducklig ate a shoe

maybe it is an idea to make it possible to change the programm that you can enter the txt files name so you dont have to change it al the time.
Quote Originally Posted by lalakijilp View Post
The ugly Ducklig ate a shoe

maybe it is an idea to make it possible to change the programm that you can enter the txt files name so you dont have to change it al the time.
Haha! Wo_Ot! you got the secret message! I will post the source code now.

Unfortunately... there are still some bugs when decrypting. Some letters end up capitalized and It all prints on one line.
Thanks for texting it lalakijilp, really appreciate that. I want to make a GUI for it because I know it is a little difficult to use now :L
Quote Originally Posted by why06 View Post
Haha! Wo_Ot! you got the secret message! I will post the source code now.

Unfortunately... there are still some bugs when decrypting. Some letters end up capitalized and It all prints on one line.
Thanks for texting it lalakijilp, really appreciate that. I want to make a GUI for it because I know it is a little difficult to use now :L
GUI =? general user interface.

if everything goes right.
you can even try coding a program.
and that only the decode program can execute so no1 can steal the source code.
GUI = graphical user interface, but close ;P'

That's an interesting idea, but this encryption is very weak.
deleted double post
Yeah, while i was away i realized it would be awesomely easy to use with a gui. I have a basic understanding of what we could do, but little idea of how we could implement it >_<.

I'll tinker a bit, until i fail.
Hey zeco! your back from ur trip. While u were gone I've been tinkering a lot. And finally got it to work mainly messing around with your source. It would be really cool to add a GUI to it. I mean I doubt that we'll use it, but I guess we could use it encrypt websites or something since the filter usually blocks them, but I would have to change the encryption because this vBulletin board doesn't support the full ASCI character set. :L
Quote Originally Posted by why06 View Post
Hey zeco! your back from ur trip. While u were gone I've been tinkering a lot. And finally got it to work mainly messing around with your source. It would be really cool to add a GUI to it. I mean I doubt that we'll use it, but I guess we could use it encrypt websites or something since the filter usually blocks them, but I would have to change the encryption because this vBulletin board doesn't support the full ASCI character set. :L
I have also been thinking about a gui, i think they key thing to think about when creating a gui, is how to get information from textboxes. They are probably an object so when i get a chance i will see if there is a way to read text from them. If there is i will try some stuff xD. But really i have little idea about gui programming. It Shall be interesting.
lol you guys... that's the easy part!

Figure out how you want to make it:
a) Win32 (writing the WndProc etc) and define the UI in code
b) Win32 and use the resource editor in VS to build the UI
c) Use something that makes it easier like MFC
d) or just make something in C# (you can link to C++ dlls if you want)
easiest way to get a GUI working would be to use MSVC++ 2003 .net since that has a working visual resource editor and can basicly give you the full code for creating a window and add buttons and stuff to it.
Posts 1–15 of 48 · Page 1 of 4
This thread is closed for replies.

Similar Threads

Tags for this Thread

Talk with us