#include<string.h>
#include <fstream>
#include <sys/time.h>
+#include <glib.h>
+
/*#include <cryptopp/hex.h>
#include <cryptopp/sha.h>
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);
}
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 "<<endl;
for (int i = 0; i < 64 ; i++) {
// DK[i]=digest[i];
- DK[i]=mix[i];
+ DK[i]=sha512[i];
}
-
+ g_free(sha512);
int *Pbox=new int[len];