X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/Cipher_code.git/blobdiff_plain/26cfeb68c1da44bc454806933dde5459455e113b..994c6a6e920abfc3823984ef4d6caaf85c2008da:/OneRoundIoT/OneRound/one_round_new.cpp?ds=sidebyside diff --git a/OneRoundIoT/OneRound/one_round_new.cpp b/OneRoundIoT/OneRound/one_round_new.cpp index be38534..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,6 +414,10 @@ 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); @@ -466,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 "<