X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/Cipher_code.git/blobdiff_plain/b3af72beed65e8fac2833f54ed3a0dde34886548..90be20ee8644c83826a07153371cc412f6821bb7:/OneRoundIoT/OneRound/one_round_new.cpp diff --git a/OneRoundIoT/OneRound/one_round_new.cpp b/OneRoundIoT/OneRound/one_round_new.cpp index 76fb91c..d4441a9 100644 --- a/OneRoundIoT/OneRound/one_round_new.cpp +++ b/OneRoundIoT/OneRound/one_round_new.cpp @@ -9,6 +9,8 @@ #include #include #include +#include + /*#include #include @@ -412,9 +414,14 @@ int main(int argc, char** argv) { uchar *data_R, *data_G, *data_B; int imsize; uchar *buffer; + + + + if(lena==1) { load_RGB_pixmap("lena.ppm", &width, &height, &data_R, &data_G, &data_B); +// load_RGB_pixmap("8192.ppm", &width, &height, &data_R, &data_G, &data_B); imsize=width*height*3; // load_RGB_pixmap("No_ecb_mode_picture.ppm", &width, &height, &data_R, &data_G, &data_B); } @@ -465,15 +472,27 @@ int main(int argc, char** argv) { for (int i = 0; i < 256 ; i++) { mix[i]=Secretkey[i]^counter[i]; + } + gchar *sha512; + + sha512 = g_compute_checksum_for_string(G_CHECKSUM_SHA512, (const char*) mix, 256); +// g_print("%s\n", sha512); + + + + + + + // cout<<"hash "<