summaryrefslogtreecommitdiff
path: root/Untracked/Doxygen/main+file.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Untracked/Doxygen/main+file.cpp')
-rw-r--r--Untracked/Doxygen/main+file.cpp86
1 files changed, 86 insertions, 0 deletions
diff --git a/Untracked/Doxygen/main+file.cpp b/Untracked/Doxygen/main+file.cpp
new file mode 100644
index 0000000..dc09d34
--- /dev/null
+++ b/Untracked/Doxygen/main+file.cpp
@@ -0,0 +1,86 @@
+/**
+ * @file main.cpp
+ * @brief Entry point
+ * @author manzerbredes
+ * @version Prototype
+ * @date 8 Mars 2015
+ *
+ * Entry point of the application.
+ *
+ */
+
+
+
+//----- std -----
+
+#include <iostream>
+#include <string>
+#include <fstream>
+
+//----- class -----
+#include "CryptClass/AESCrypt.hpp"
+#include "CryptClass/HASHCrypt.hpp"
+
+//----- Prototype -----
+void aff(std::string chaine);
+
+
+/**
+ * @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[]){
+
+
+
+ /*for(int i=0;i< 1000;i++){
+ for(int j=0;j< 100;j++){
+*/
+ AESCrypt cryptage=AESCrypt();
+ HASHCrypt hash;
+
+
+ std::string cle="loic";
+ std::string data="ABCDEFGH";
+
+ byte digest[16];
+ hash.getMD5_128(data, digest, sizeof(digest));
+
+ std::cout << hash.digestToString(digest, sizeof(digest));
+
+
+ std::ofstream fw;
+ fw.open ("bob.bin", std::ios::out | std::ios::binary);
+
+ fw.write((char *) digest,sizeof(digest));
+
+ fw.close();
+
+ std::ifstream fr;
+ fr.open ("bob.bin", std::ios::in | std::ios::binary);
+
+ byte bb[16];
+ fr.read((char*) bb, sizeof(bb));
+
+ fr.close();
+ bb[0]=-9;
+
+ std::cout << std::endl << hash.digestToString(bb, sizeof(bb));
+
+
+ return 0;
+
+}
+
+
+
+
+//---- Functions -----
+
+void aff(std::string chaine){
+ std::cout << chaine;
+}