forgetIt/main.cpp

60 lines
986 B
C++
Raw Normal View History

/**
* @file main.cpp
* @brief Entry point
* @author manzerbredes
* @version Prototype
* @date 8 Mars 2015
*
* Entry point of the application.
*
*/
//----- std -----
2015-03-06 11:06:27 +04:00
#include <iostream>
#include <string>
//----- class -----
#include "AESCrypt.hpp"
#include "HASHCrypt.hpp"
#include "FileManIOFile.hpp"
2015-03-06 11:06:27 +04:00
/**
* @fn int main(int argc, char *argv[])
* @author manzerbredes
* @brief main function
* @param argc contain *argv[] length
* @param *argv[] contain the arguments list
* @return Return code, an int.
*/
int main(int argc, char *argv[]){
2015-03-06 11:06:27 +04:00
2015-03-09 13:01:13 +04:00
std::string chaine="It's work !";
std::string key="loic";
2015-03-09 13:01:13 +04:00
AESCrypt aes;
FileManIOFile fichier = FileManIOFile("Doxygen/bob.bin");
2015-03-09 13:01:13 +04:00
fichier.write(key, chaine);
fichier.read(key);
if(fichier.isReadable())
std::cout << fichier.getData();
fichier.write(chaine+" YES");
2015-03-09 13:01:13 +04:00
fichier.read(key);
2015-03-06 11:06:27 +04:00
if(fichier.isReadable())
std::cout << fichier.getData();
2015-03-06 11:06:27 +04:00
return 0;
}