
Aceix::Code
By:
aceix on
Oct 18th, 2012 | syntax:
C++ | size: 2.22 KB | hits: 47 | expires: Never
#include <iostream>
#include <windows.h>
#include <iomanip>
#include <ctime>
#include <cstdlib>
#include <fstream>
using namespace std;
//Other headers...
#include "../md5.h"
#include "main.h"
#include "intro.h"
int main()
{
fnPlayIntro();
encryptndecrypt end1;
int iChoice;
char cChoice;
do
{
Menu();
fnMainMenu(iChoice);
switch(iChoice)
{
case 1:
Menu();
cin.ignore();
cout<<"Please enter a string to be encrypted: ";
if(!end1.encrypt())
{
error=ERR_ENCRYPTION;
fnError(error);
cin.get();
}
else
{
end1.save();
Menu();
cout<<"This is the password to decrypt or access your info!\nGaurd it with your life: ";
end1.showMD5();
cout<<"\n\nDo you want to copy to clipboard(y/n)?";
cout<<"\nSelection: ";
cin>>cChoice;
if(cChoice=='y')
{
if(end1.fnSaveMD5ToClipboard())
cout<<"\nCopied successfully!";
else
cout<<"\nFailed to copy!";
cin.get();
}
cChoice='0';
end1.fnClearInstance();
cin.get();
}
break;
case 2:
Menu();
cout<<"Yet to come!";
cin.ignore();
cin.get();
break;
case 3:
Menu();
cout<<"Yet to come!";
cin.ignore();
cin.get();
break;
case 4:
exit(0);
break;
case 0:
cin.ignore();
cin.get();
break;
default:
error=ERR_WRONGINPUT;
fnError(error);
cin.ignore();
cin.get();
}
}while(iChoice!=4);
return 0;
}