X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/Cipher_code.git/blobdiff_plain/26cfeb68c1da44bc454806933dde5459455e113b..7c69daf40abaa790d5f01e034bf458dfa5594e20:/IDA/ida_gf65.cpp diff --git a/IDA/ida_gf65.cpp b/IDA/ida_gf65.cpp index 09c4162..d497186 100644 --- a/IDA/ida_gf65.cpp +++ b/IDA/ida_gf65.cpp @@ -10,6 +10,10 @@ #include #include // std::random_shuffle #include // std::vector +#include +#include + + extern "C" { #include "jerasure.h" } @@ -20,7 +24,7 @@ typedef unsigned long mylong; using namespace std; -string cloud[5]={"dropboxida1","googleida1","megaida1","onedriveida1","pcloudida1"}; +string cloud[5]={"dropboxida1","googleida1","onedriveida2","onedriveida1","pcloudida1"}; void display(mylong *mat, int r, int c) { @@ -218,9 +222,9 @@ int invertible_matrix(gf_t *gf, int *mat, int rows, int w) mylong* readFullFile(int n, int t, mylong& sizeFile, mylong & padded_size) { - ifstream stream("lena.png", ios::in | ios::binary | ios::ate); +// ifstream stream("lena.png", ios::in | ios::binary | ios::ate); // ifstream stream("lena_small.png", ios::in | ios::binary | ios::ate); -// ifstream stream("/home/couturie/Downloads/CARCARIASS.zip", ios::in | ios::binary | ios::ate); + ifstream stream("/home/couturie/Downloads/CARCARIASS.zip", ios::in | ios::binary | ios::ate); sizeFile=stream.tellg(); std::cout << sizeFile << std::endl; @@ -376,7 +380,7 @@ int main(int argc, char **argv) mylong *identity; - int size=5000000; +// int size=5000000; int t=3; int n=5; @@ -441,18 +445,27 @@ int main(int argc, char **argv) // display(matC,t,t); - + thread th[n]; //Save trunks for(int i=0;i=t;i--) { -// for(int i=0;i(&matS2[1]); - saveFile(reconstucted_data, "lena2.png",new_size); + saveFile(reconstucted_data, "file.dat",new_size); return 0; }