Advertisement
aceix

Aceix::Code

Oct 18th, 2012
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.22 KB | None | 0 0
  1. #include <iostream>
  2. #include <windows.h>
  3. #include <iomanip>
  4. #include <ctime>
  5. #include <cstdlib>
  6. #include <fstream>
  7.  
  8. using namespace std;
  9.  
  10. //Other headers...
  11. #include "../md5.h"
  12. #include "main.h"
  13. #include "intro.h"
  14.  
  15. int main()
  16. {
  17.     fnPlayIntro();
  18.  
  19.     encryptndecrypt end1;
  20.     int iChoice;
  21.     char cChoice;
  22.  
  23.     do
  24.     {
  25.         Menu();
  26.         fnMainMenu(iChoice);
  27.  
  28.         switch(iChoice)
  29.         {
  30.             case 1:
  31.                 Menu();
  32.                 cin.ignore();
  33.                 cout<<"Please enter a string to be encrypted: ";
  34.                 if(!end1.encrypt())
  35.                 {
  36.                     error=ERR_ENCRYPTION;
  37.                     fnError(error);
  38.                     cin.get();
  39.                 }
  40.                 else
  41.                 {
  42.                     end1.save();
  43.                     Menu();
  44.                     cout<<"This is the password to decrypt or access your info!\nGaurd it with your life: ";
  45.                     end1.showMD5();
  46.                     cout<<"\n\nDo you want to copy to clipboard(y/n)?";
  47.                     cout<<"\nSelection: ";
  48.                     cin>>cChoice;
  49.                     if(cChoice=='y')
  50.                     {
  51.                         if(end1.fnSaveMD5ToClipboard())
  52.                             cout<<"\nCopied successfully!";
  53.                         else
  54.                             cout<<"\nFailed to copy!";
  55.                         cin.get();
  56.                     }
  57.                     cChoice='0';
  58.                     end1.fnClearInstance();
  59.                     cin.get();
  60.                 }
  61.                 break;
  62.             case 2:
  63.                 Menu();
  64.                 cout<<"Yet to come!";
  65.                 cin.ignore();
  66.                 cin.get();
  67.                 break;
  68.             case 3:
  69.                 Menu();
  70.                 cout<<"Yet to come!";
  71.                 cin.ignore();
  72.                 cin.get();
  73.                 break;
  74.             case 4:
  75.                 exit(0);
  76.                 break;
  77.             case 0:
  78.                 cin.ignore();
  79.                 cin.get();
  80.                 break;
  81.             default:
  82.                 error=ERR_WRONGINPUT;
  83.                 fnError(error);
  84.                 cin.ignore();
  85.                 cin.get();
  86.         }
  87.     }while(iChoice!=4);
  88.  
  89.     return 0;
  90. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement