Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*==================================================================================================
- --------------------------------------------------------------------------------------------------
- [simpleCrypto.cpp]
- A thorough demonstration of how the not-so-simplest method of cryptography works.
- NOTE:
- This particular method employs the substitution cipher technique, using (only) the Extended ASCII
- Character set.
- The ASCII chart can be obtained at: http://www.asciitable.com
- (c) Damion 'Phr0z3n.dev' Tapper, 2014.
- Email: Phr0z3n.Dev@Gmail.com
- --------------------------------------------------------------------------------------------------
- ==================================================================================================*/
- /**
- * Activating either of the following directives will determine which environment (Windows or POSIX)
- * the program will function on... flawlessly.
- **/
- #define _MY_ENV _WINDOWS
- //#define _MY_ENV _NIX
- #include <iostream>
- #include <fstream>
- #include <string>
- /**
- * It is sections like these that justify the previous act...
- **/
- #if _MY_ENV == _WINDOWS
- #include <windows.h>
- #define CSBI CONSOLE_SCREEN_BUFFER_INFO
- #elif _MY_ENV == _NIX
- #include <cstdlib>
- #include <termios.h>
- #include <unistd.h>
- #include <term.h>
- #endif
- #include "simpleCrypto.hpp"
- /*===============================================--=================================================
- THE MAIN FUNCTION
- --------------------------------------------------------------------------------------------------*/
- int main(void)
- {
- /**
- * The instantiation of the CCrypt0 class. 'The books' compellingly state, "pointers are used to
- * reduce pushing and popping on the stack (aka 'stack labour')." (Ultimately, eventually, being
- * that pointers are allocated on 'the heap').
- *
- * Other books also fundamentally urged that, "pointers are your friend." Semantically, owing to
- * this sole concept, pay attention to the cleanness of the code (the class was instantiated once,
- * and only once).
- **/
- CCrypt0 *ccrypto(new CCrypt0());
- if(ccrypto->mainMenu() == 0)
- {
- /**
- * Tidy coding techniques is one of the most fundamental paradigms that separates (good)
- * programmers from (crappy) ones.
- *
- * NOTE:
- * There are coders that fail to adhere to this 'thumb rule' only because their belief
- * systems revolve around the concept that 'only the stack needs cleaning up' before
- * program termination. If only there was only 'stack overflow'...
- **/
- delete ccrypto;
- exit(EXIT_SUCCESS);
- }
- delete ccrypto;
- return 0;
- }
- /*===============================================--=================================================
- THE MAIN MENU FUNCTION
- --------------------------------------------------------------------------------------------------*/
- int CCrypt0::mainMenu(void)
- {
- std::string *mainMenuOptBuffer(new std::string); // Why 'string' and not 'char'?
- /**
- * std::cin.get() (not pertaining to certain overloaded versions), accepts (and store) only one
- * character at a time (ONLY when ENTER is pressed). This bit of logic does not hinder the fact
- * that more than one characters can still be entered at an std::cin.get() prompt.
- *
- * In its true sense, expecting a '1' menu option and even accepting a '1abc' option instead,
- * is in no way, logical. std::cin.getline() will store all options entered, and the relative
- * logic implemented, will evaluate and differentiate between '1' and '1abc'
- * (&| an option of length 1 || > 1).
- *
- * It is the latter-mentioned logic (among other radical coding conventions), which is actually
- * implemented in this code, that makes this program foolproof.
- **/
- while(mainMenuOptBuffer->length() != 1)
- {
- /**
- * Console menu recursion without logic to clear the screen is redundantly messy.
- * No pun intended.
- **/
- CCrypt0::clearScreen();
- std::cout << "SELECT METHOD (1-4)" << std::endl << std::endl;
- std::cout << "[ENCRYPT]" << std::endl;
- std::cout << "1. " << "Text" << std::endl;
- std::cout << "2. " << "File Text" << std::endl << std::endl;
- std::cout << "[DECRYPT]" << std::endl;
- std::cout << "3. " << "Text" << std::endl;
- std::cout << "4. " << "File Text" << std::endl << std::endl;
- std::cout << "5. " << "Exit" << std::endl << std::endl;
- std::cout << ">: ";
- std::getline(std::cin, *mainMenuOptBuffer, '\n');
- }
- CCrypt0::setMainMenuOpt(mainMenuOptBuffer->data()[0]);
- delete mainMenuOptBuffer;
- switch(CCrypt0::getMainMenuOpt())
- {
- case '1':
- case '3':
- CCrypt0::encryptDecryptText();
- case '2':
- case '4':
- CCrypt0::encryptDecryptFileText();
- case '5':
- return 0;
- default:
- main();
- }
- return 0;
- }
- /*===============================================--=================================================
- THE ENCRYPT/DECRYPT TEXT FUNCTION
- --------------------------------------------------------------------------------------------------*/
- void CCrypt0::encryptDecryptText(void)
- {
- std::string *_cryptBuffer(new std::string);
- while(_cryptBuffer->length() == 0)
- {
- CCrypt0::clearScreen();
- switch(CCrypt0::getMainMenuOpt())
- {
- case '1':
- std::cout << "[ENCRYPT TEXT]" << std::endl << std::endl;
- break;
- case '3':
- std::cout << "[DECRYPT TEXT]" << std::endl << std::endl;
- break;
- }
- std::cout << "Enter The Text:" << std::endl;
- std::getline(std::cin, *_cryptBuffer, '\n');
- }
- CCrypt0::setCryptBuffer(_cryptBuffer);
- delete _cryptBuffer;
- switch(CCrypt0::getMainMenuOpt())
- {
- case '1':
- CCrypt0::doEncrypt();
- break;
- case '3':
- CCrypt0::doDecrypt();
- break;
- }
- CCrypt0::outputMenu();
- }
- void CCrypt0::encryptDecryptFileText(void)
- {
- CCrypt0::fileNameEntry(_FILE_READ);
- /**
- * READ FILE CONTENTS...
- **/
- CCrypt0::setFileFlag(_FILE_READ_FLAG);
- CCrypt0::readWriteText();
- /**
- * ENCRYPT/DECRYPT FILE CONTENTS...
- **/
- switch(CCrypt0::getMainMenuOpt())
- {
- case '2':
- CCrypt0::doEncrypt();
- break;
- case '4':
- CCrypt0::doDecrypt();
- break;
- }
- CCrypt0::outputMenu();
- }
- /*===============================================--=================================================
- THE OUTPUT MENU FUNCTION
- --------------------------------------------------------------------------------------------------*/
- void CCrypt0::outputMenu(void)
- {
- std::string *outputMenuOptBuffer(new std::string);
- while(outputMenuOptBuffer->length() != 1)
- {
- CCrypt0::clearScreen();
- switch(CCrypt0::getMainMenuOpt())
- {
- case '1':
- std::cout << "Text successfully encrypted..." << std::endl;
- break;
- case '2':
- std::cout << "File text successfully encrypted..." << std::endl;
- break;
- case '3':
- std::cout << "Text successfully decrypted..." << std::endl;
- break;
- case '4':
- std::cout << "File text successfully decrypted..." << std::endl;
- break;
- }
- std::cout << std::endl;
- std::cout << "[OUTPUT METHOD]" << std::endl;
- std::cout << "1. " << "Text" << std::endl;
- std::cout << "2. " << "File" << std::endl;
- std::cout << "3. " << "Text & File" << std::endl;
- std::cout << "4. " << "Discard" << std::endl << std::endl;
- std::cout << ">: ";
- std::getline(std::cin, *outputMenuOptBuffer, '\n');
- }
- switch(outputMenuOptBuffer->data()[0])
- {
- case '1':
- CCrypt0::displayText();
- break;
- case '2':
- CCrypt0::fileNameEntry(_FILE_WRITE);
- CCrypt0::setFileFlag(_FILE_WRITE_FLAG);
- CCrypt0::readWriteText();
- CCrypt0::clearScreen();
- std::cout << '\'' << CCrypt0::getFileName() << '\'' << " successfully saved." << std::endl;
- break;
- case '3':
- CCrypt0::fileNameEntry(_FILE_WRITE);
- CCrypt0::setFileFlag(_FILE_WRITE_FLAG);
- CCrypt0::readWriteText();
- CCrypt0::displayText();
- std::cout << '\'' << CCrypt0::getFileName() << '\'' << " successfully saved." << std::endl;
- break;
- case '4':
- CCrypt0::setCryptBuffer(new std::string(""));
- delete outputMenuOptBuffer;
- main();
- }
- delete outputMenuOptBuffer;
- std::cout << "Press ENTER to continue...";
- /**
- * Tricky stuff. Definitely don't take this with a grain of salt.
- **/
- SetStdinEcho(false);
- std::cin.get();
- SetStdinEcho(true);
- main();
- }
- /*===============================================--=================================================
- THE DISPLAY TEXT FUNCTION
- --------------------------------------------------------------------------------------------------*/
- void CCrypt0::displayText(void)
- {
- CCrypt0::clearScreen();
- switch(CCrypt0::getMainMenuOpt())
- {
- case '1':
- std::cout << "[ENCRYPTED TEXT]";
- break;
- case '2':
- std::cout << "[ENCRYPTED FILE TEXT]";
- break;
- case '3':
- std::cout << "[DECRYPTED TEXT]";
- break;
- case '4':
- std::cout << "[DECRYPTED FILE TEXT]";
- break;
- }
- std::cout << std::endl << std::endl << CCrypt0::getCryptBuffer() << std::endl << std::endl;
- }
- /*===============================================--=================================================
- THE TEXT ENCRYPTION FUNCTION
- --------------------------------------------------------------------------------------------------*/
- inline void CCrypt0::doEncrypt(void)
- {
- /**
- * This function does a nifty little thing. It changes a variable passed into it using a pointer.
- * Plus no return value is utilized. The code is technically implemented in the function that calls it.
- * Its only just I do it justice with the 'inline' keyword.
- **/
- /**
- * NOTE:
- * Elite coding techniques entail implementing 'cholesterol-free' code that produce un-bloated apps.
- * With a known min/max range (0-255), over-sized variables types would be inefficient.
- **/
- static unsigned char testVar;
- static unsigned char cryptVar;
- std::string *_cryptBuffer(new std::string);
- *_cryptBuffer = CCrypt0::getCryptBuffer();
- for(unsigned short bufferPos = 0; _cryptBuffer->data()[bufferPos] != '\0' ; bufferPos++)
- /**
- * NOTE:
- * This is a 'very interesting' loop where the re-initialization of both variables utilized
- * (upon each iteration), is paramount to the code functioning.
- **/
- for(testVar = 32, cryptVar = 255; testVar < 127; testVar++, cryptVar--)
- /**
- * NOTE:
- * Based on experience, I have managed to draw one particular conclusion: "C++ can be a
- * very 'peculiar' language", hence, the type of casting used.
- **/
- if(_cryptBuffer->data()[bufferPos] == static_cast<char>(testVar))
- const_cast<char *>(_cryptBuffer->data())[bufferPos] = static_cast<char>(cryptVar);
- CCrypt0::setCryptBuffer(_cryptBuffer);
- delete _cryptBuffer;
- /**
- * NOTE:
- * The algorithm implemented in this process is similar to the one implemented in the MySQL MD5
- * encryption function.
- **/
- }
- /*===============================================--=================================================
- THE TEXT DECRYPTION FUNCTION
- --------------------------------------------------------------------------------------------------*/
- inline void CCrypt0::doDecrypt(void)
- {
- static unsigned char testVar;
- static unsigned char cryptVar;
- std::string *_cryptBuffer(new std::string);
- *_cryptBuffer = CCrypt0::getCryptBuffer();
- /**
- * NOTE:
- * Like key verification, if the algorithms are not 'oppositely similar' (;)), the decrypted text
- * will be wrong.
- **/
- for(unsigned short bufferPos = 0; _cryptBuffer->data()[bufferPos] != '\0' ; bufferPos++)
- for(testVar = 32, cryptVar = 255; testVar < 127; testVar++, cryptVar--)
- if(_cryptBuffer->data()[bufferPos] == static_cast<char>(cryptVar))
- const_cast<char *>(_cryptBuffer->data())[bufferPos] = static_cast<char>(testVar);
- CCrypt0::setCryptBuffer(_cryptBuffer);
- delete _cryptBuffer;
- }
- /*===============================================--=================================================
- THE FILENAME ENTRY FUNCTION
- --------------------------------------------------------------------------------------------------*/
- inline void CCrypt0::fileNameEntry(char fnEntryType)
- {
- std::string *_fileNameBuffer(new std::string);
- /**
- * FILE NAME ENTRY...
- **/
- while(_fileNameBuffer->length() == 0)
- {
- CCrypt0::clearScreen();
- if(fnEntryType == _FILE_READ)
- switch(CCrypt0::getMainMenuOpt())
- {
- case '2':
- std::cout << "[ENCRYPT FILE TEXT]" << std::endl << std::endl;
- break;
- case '4':
- std::cout << "[DECRYPT FILE TEXT]" << std::endl << std::endl;
- break;
- }
- else if(fnEntryType == _FILE_WRITE)
- std::cout << "[SAVE FILE]" << std::endl << std::endl;
- std::cout << "Enter The File Name (eg: file.txt):" << std::endl;
- std::cout << ">: ";
- std::getline(std::cin, *_fileNameBuffer, '\n');
- }
- std::cout << std::endl;
- CCrypt0::setFileName(_fileNameBuffer);
- delete _fileNameBuffer;
- }
- /*===============================================--=================================================
- THE TEXT FILE READ/WRITE FUNCTION
- --------------------------------------------------------------------------------------------------*/
- void CCrypt0::readWriteText(void)
- {
- std::filebuf *fileBuffer(new std::filebuf);
- std::ostream writeFile(fileBuffer);
- std::istream readFile(fileBuffer);
- switch(CCrypt0::getFileFlag())
- {
- case _FILE_READ_FLAG:
- fileBuffer->open(CCrypt0::getFileName().data(), CCrypt0::getFileFlag()); //try 1
- /**
- * 'The books' state a lot of things. Another highly regarded one (stopped short of)
- * utterly despising exception handling, in C++, in the try/catch formation, with sound
- * logic: the technique encourages lazy coding implementations, which lead to the program
- * attempting to do too much, with too much (catch(...) for instance), and an end product
- * with (possibly) more holes with than without, or a 'cure is worse than the disease'
- * scenario.
- *
- * I decided to implement my own overly extensive error-handling techniques... and my
- * code works still.
- **/
- if(fileBuffer->is_open())
- {
- /**
- * I have discovered the use of the block to overcome those little annoying coding
- * hurdles, such as declaring a 'once-used' variable, anywhere but the top of your
- * code, in C.
- *
- * In this case, declaring an std::string type after an std::ios_base::opmode type
- * (among others), without the use of a block (the 'if-else' one, in this case),
- * causes violent compiler panic...
- * ...for whatever reason(s)...
- **/
- std::string *_cryptBuffer(new std::string);
- /**
- * Go to the beginning of the file.
- **/
- readFile.seekg(0);
- /**
- * Read the file (one character at a time): old school.
- *
- * NOTE:
- * This method is perfect in more than one ways. One scenario is where a mixture
- * of Unicode and non-Unicode characters for instance, need to be inspected (and
- * manipulated (replaced, for example)), on-the-fly.
- **/
- for(char readChar = '\0'; readFile.get(readChar);) //try 2
- _cryptBuffer->append(1, readChar);
- if(_cryptBuffer->length() == 0)//catch 2, etc.
- {
- fileBuffer->close();
- CCrypt0::setFileWarningError(2);
- CCrypt0::printFileWarningError();
- }
- CCrypt0::setCryptBuffer(_cryptBuffer);
- delete _cryptBuffer;
- }
- else //catch 1
- {
- CCrypt0::setFileWarningError(1);
- CCrypt0::printFileWarningError();
- }
- break;
- case _FILE_WRITE_FLAG:
- /**
- * Test if the file specified already exists...
- **/
- fileBuffer->open(CCrypt0::getFileName().data(), _FILE_READ_FLAG);
- /**
- * If so, prompt for relative actions...
- **/
- if(fileBuffer->is_open())
- {
- fileBuffer->close();
- CCrypt0::setFileWarningError(10);
- CCrypt0::printFileWarningError();
- }
- /**
- * If not, try creating a new file to write to...
- **/
- fileBuffer->open(CCrypt0::getFileName().data(), CCrypt0::getFileFlag());
- /**
- * If success, attempt file write...
- **/
- if(fileBuffer->is_open())
- {
- writeFile << CCrypt0::getCryptBuffer();
- /**
- * If write fails, alert accordingly...
- **/
- if(writeFile.fail())
- {
- fileBuffer->close();
- CCrypt0::setFileWarningError(4);
- CCrypt0::printFileWarningError();
- }
- }
- else
- {
- CCrypt0::setFileWarningError(3);
- CCrypt0::printFileWarningError();
- }
- break;
- }
- fileBuffer->close();
- }
- /*===============================================--=================================================
- THE FILE WARNING/ERROR FUNCTION
- --------------------------------------------------------------------------------------------------*/
- void CCrypt0::printFileWarningError(void)
- {
- if(CCrypt0::getFileWarningError() == 1 || CCrypt0::getFileWarningError() == 2)
- {
- CCrypt0::clearScreen();
- switch(CCrypt0::getFileWarningError())
- {
- case 1:
- std::cout << "[FILE OPEN ERROR!]" << std::endl << std::endl;
- std::cout << "Verify that '" << CCrypt0::getFileName() << "' exists in the path specified," << std::endl;
- break;
- case 2:
- std::cout << "[FILE READ ERROR!]" << std::endl << std::endl;
- switch(CCrypt0::getMainMenuOpt())
- {
- case 2:
- std::cout << "Nothing to encrypt." << std::endl;
- break;
- case 4:
- std::cout << "Nothing to decrypt." << std::endl;
- break;
- }
- std::cout << "Verify that '" << CCrypt0::getFileName() << "' contains text," << std::endl;
- break;
- }
- std::cout << "and/or is not being used by another process." << std::endl << std::endl;
- std::cout << "Press any key to continue...";
- std::cin.get();
- main();
- }
- else if(CCrypt0::getFileWarningError() == 3 || CCrypt0::getFileWarningError() == 4)
- {
- std::string *fileWarningMenuOptBuffer(new std::string);
- while(fileWarningMenuOptBuffer->length() != 1)
- {
- CCrypt0::clearScreen();
- switch(CCrypt0::getFileWarningError())
- {
- case 3:
- std::cout << "[FILE CREATION ERROR!]" << std::endl << std::endl;
- std::cout << "Error creating '" << CCrypt0::getFileName() << "' for saving." << std::endl << std::endl;
- break;
- case 4:
- std::cout << "[FILE SAVE ERROR!]" << std::endl << std::endl;
- std::cout << "Error saving to '" << CCrypt0::getFileName() << "'." << std::endl << std::endl;
- break;
- }
- std::cout << "[OPTION]" << std::endl;
- std::cout << "1. " << "Output Menu" << std::endl;
- std::cout << "2. " << "Main Menu" << std::endl << std::endl;
- std::cout << ">: ";
- std::getline(std::cin, *fileWarningMenuOptBuffer, '\n');
- }
- switch(fileWarningMenuOptBuffer->data()[0])
- {
- case '1':
- CCrypt0::outputMenu();
- return;
- case '2':
- CCrypt0::setCryptBuffer(new std::string);
- delete fileWarningMenuOptBuffer;
- main();
- }
- }
- else if(CCrypt0::getFileWarningError() == 10)
- {
- std::string *fileWarningMenuOptBuffer(new std::string);
- while(fileWarningMenuOptBuffer->length() != 1)
- {
- CCrypt0::clearScreen();
- std::cout << "[FILE WARNING!]" << std::endl << std::endl;
- std::cout << '\'' << CCrypt0::getFileName() << "' already exists in the path specified:" << std::endl << std::endl;
- std::cout << "[OPTION]" << std::endl;
- std::cout << "1. " << "Overwrite File" << std::endl;
- std::cout << "2. " << "Output Menu" << std::endl;
- std::cout << "3. " << "Main Menu" << std::endl << std::endl;
- std::cout << ">: ";
- std::getline(std::cin, *fileWarningMenuOptBuffer, '\n');
- }
- switch(fileWarningMenuOptBuffer->data()[0])
- {
- case '1':
- delete fileWarningMenuOptBuffer;
- return;
- case '2':
- delete fileWarningMenuOptBuffer;
- CCrypt0::outputMenu();
- case '3':
- CCrypt0::setCryptBuffer(new std::string);
- delete fileWarningMenuOptBuffer;
- main();
- }
- }
- }
- /*===============================================--=================================================
- THE CLEAR SCREEN FUNCTION (REUSABLE)
- --------------------------------------------------------------------------------------------------*/
- void CCrypt0::clearScreen(void)
- {
- #if _MY_ENV == _WINDOWS
- /**
- * NOTE:
- * This particular function is a nifty little snippet anyone can use, with minimal alterations
- * (function declaration), to clear the console screen on both Windows and POSIX environments,
- * without having to depend on the predefined non-standard ones in header files that accompany
- * particular IDEs. All that is required is the inclusion of the 'windows.h' header file
- * (for Windows) or some other relative few for POSIX.
- **/
- COORD coordScreen = {0, 0}; /* Home for the cursor. */
- DWORD cCharsWritten;
- /**
- * NOTE:
- * CSBI is originally defined as CONSOLE_SCREEN_BUFFER_INFO in (windows.h) 'wincon.h' but I suspected
- * that the abbreviated redefinition (in 'simpleCrypto.hpp') would make the code neater.
- **/
- CSBI csbi;
- DWORD dwConSize;
- HANDLE hConsoleOut = GetStdHandle(STD_OUTPUT_HANDLE);
- /* Get the number of character cells in the current buffer. */
- if(!GetConsoleScreenBufferInfo(hConsoleOut, &csbi))
- return;
- dwConSize = csbi.dwSize.X * csbi.dwSize.Y;
- /* Fill the entire screen with blanks. */
- if(!FillConsoleOutputCharacter(hConsoleOut, ' ', dwConSize, coordScreen, &cCharsWritten))
- return;
- /* Get the current text attribute. */
- if(!GetConsoleScreenBufferInfo(hConsoleOut, &csbi))
- return;
- /* Set the buffer's attributes accordingly. */
- if(!FillConsoleOutputAttribute(hConsoleOut, csbi.wAttributes, dwConSize, coordScreen, &cCharsWritten))
- return;
- /* Put the cursor at its home coordinates. */
- SetConsoleCursorPosition(hConsoleOut, coordScreen);
- #elif _MY_ENV == _NIX
- if(!cur_term)
- {
- int result;
- setupterm(NULL, STDOUT_FILENO, &result);
- if(result <= 0) return;
- }
- putp(tigetstr("clear"));
- #endif
- }
- /*===============================================--=================================================
- THE STDIN ECHO ENABLE/DISABLE FUNCTION (REUSABLE)
- --------------------------------------------------------------------------------------------------*/
- void CCrypt0::SetStdinEcho(bool enable = true)
- {
- /**
- * This function is used to 'pull a rabbit out of the hat', in order to emulate non-standard C
- * functionalities in C++.
- **/
- #if _MY_ENV == _WINDOWS
- HANDLE hStdin = GetStdHandle(STD_INPUT_HANDLE);
- DWORD mode;
- GetConsoleMode(hStdin, &mode);
- if(!enable)
- mode &= ~ENABLE_ECHO_INPUT;
- else
- mode |= ENABLE_ECHO_INPUT;
- SetConsoleMode(hStdin, mode);
- #elif _MY_ENV == _NIX
- struct termios tty;
- tcgetattr(STDIN_FILENO, &tty);
- if(!enable)
- tty.c_lflag &= ~ECHO;
- else
- tty.c_lflag |= ECHO;
- (void)tcsetattr(STDIN_FILENO, TCSANOW, &tty);
- #endif
- }
- /*===============================================--=================================================
- THE CCRYPT0 CONSTRUCTOR
- --------------------------------------------------------------------------------------------------*/
- CCrypt0::CCrypt0(void)
- : mainMenuOpt('\0'),
- fileName(""),
- fileWarningError(0),
- cryptBuffer("")
- {
- /**
- * Class variables are initialized to a 'clean' state. This is superior programming practice.
- * Note that most variables are initialized to 'nothing' upon creation while some are not.
- * Its always good practice to look over your shoulders in programming, being that there are
- * always malicious people around who are aching to exploit your code.
- **/
- }
- /*===============================================--=================================================
- THE CCRYPT0 DESTRUCTOR
- --------------------------------------------------------------------------------------------------*/
- CCrypt0::~CCrypt0()
- {
- /**
- * Notice how the destructor of the class performs the same tasks as its constructor counterpart.
- * Erasing what was stored in memory should be an utmost priority when exiting a program.
- * In cases where faulty coding leads to memory leaks, you do not want such a scenario to apply
- * to a mission-critical password/database-utilising program, for instance.
- **/
- CCrypt0::setMainMenuOpt('\0');
- CCrypt0::setFileName(new std::string);
- CCrypt0::setFileWarningError(0);
- CCrypt0::setCryptBuffer(new std::string);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement