diff --git a/.idea/aes.iml b/.idea/aes.iml
index 921849b..aa88931 100644
--- a/.idea/aes.iml
+++ b/.idea/aes.iml
@@ -4,7 +4,6 @@
-
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index affbea9..350e93e 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -2,14 +2,14 @@
+
-
+
-
-
+
@@ -19,8 +19,9 @@
-
-
+
+
+
@@ -40,45 +41,11 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
+
+
+
@@ -224,12 +190,12 @@
-
+
-
+
-
+
@@ -271,7 +237,7 @@
-
+
@@ -279,6 +245,14 @@
+
+
+
+
+
+
+
+
@@ -302,26 +276,18 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
diff --git a/aes.hpp b/aes.hpp
index 5e8c1d8..ab096cb 100644
--- a/aes.hpp
+++ b/aes.hpp
@@ -130,7 +130,7 @@ int aes::readFile(unsigned char** file, const char* filename) {
fseek(fd, 0, SEEK_SET);
// Allocate space for the file
- *file = (unsigned char*)malloc(fileLength);
+ *file = (unsigned char*)malloc(fileLength); // @FIXME : failed for bigest file // maybe with new
if(*file == NULL) {
fprintf(stderr, "Failed to allocate memory\n");
exit(1);
diff --git a/bin/crypt.ex b/bin/crypt.ex
index 4fc9647..0b040fd 100755
Binary files a/bin/crypt.ex and b/bin/crypt.ex differ
diff --git a/mainCrypt.cpp b/mainCrypt.cpp
index 9cd6aac..9dd51c7 100644
--- a/mainCrypt.cpp
+++ b/mainCrypt.cpp
@@ -12,8 +12,11 @@ int main(int argc, char* argv[]) {
// Read the file to encrypt
unsigned char* file;
+//******************************************************************* while a rajouté pour les gros fichier
// readFile fait l'aloccation mémoire !!! pensé au free
size_t fileLength = O->readFile(&file);
+ O->aesEncrypt();
+
printf("%d bytes to be encrypted\n", (int)fileLength);
// Encrypt the file
@@ -38,6 +41,7 @@ int main(int argc, char* argv[]) {
free(encryptedFile);
free(file);
+//******************************************************************
delete O;
return 0;