Encryption Of A Message

Code Id 39
Date Updated 11/7/2010
Title Encryption of a message  
Description
This is an encryption program created using the vigenere algorithm. 
                                  
Attachments
Source Code encrypt.zip
Codes Snippet
//An encryption program I made using the vigenere algorithm.
//Encrypt.cpp
#include 

#include "Message.h"
#include "Table.h"
using namespace std;

#define MAXLENGTH 256

void getMessage(char& amessage, char& akey);

int main(int argc, char* argv[])
{
        Message myMessage;
        
        if(argc != 2)
        {
                cout << "usage: " << argv[0] << ".exe -d or -e" << endl;
                return 0;
        }
        
        if( !strcmp(argv[1], "-d"))
        {
                myMessage.getMessage();
                myMessage.getKey();
                myMessage.decryptMessage();
        }
        
        if( !strcmp(argv[1], "-e"))
        {
                myMessage.getMessage();
                myMessage.getKey();
                myMessage.encryptMessage();
        }
                
        return 0;
}

Comments are closed.