X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/Cipher_code.git/blobdiff_plain/7b02553c06f361be8c2f181d0a6cb4cd6b4fdb39..ea3a860bdf36f8e078162f3ef955b90e5d885ad5:/OneRoundIoT/OneRound/one_round_new.cpp 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 "<