uchar j0=0;
for (int it=0; it<ldata; it++) {
- i0 = ((i0+1)%255);
+ i0 = ((i0+1)&0xFE); //%255);
j0 = (j0 + sc[i0])&0xFF;
uchar tmp = sc[i0];
sc[i0] = sc[j0];
if(strncmp(argv[i],"lena",4)==0) lena = atoi(&(argv[i][4])); //Use Lena or buffer
}
- printf("nb times %d\n",nb_test);
+/* printf("nb times %d\n",nb_test);
printf("ctr %d\n",ctr);
printf("h %d\n",h);
printf("lena %d\n",lena);
printf("size_buf %d\n",size_buf);
-
+*/
int h2=h*h;
int seed=time(NULL);
- cout<<seed<<endl;
+// cout<<seed<<endl;
srand48(seed);
uchar Secretkey[key_size];
}
- cout<<"hash "<<endl;
+// cout<<"hash "<<endl;
for (int i = 0; i < 64 ; i++) {
// DK[i]=digest[i];
DK[i]=mix[i];
rc4keyperm(keyp, len, rp, Pbox, 16);
- printf("len %d\n",len);
+// printf("len %d\n",len);
for(int i=0;i<len;i++) {
// printf("%d \n",Pbox[i]);
}
equal=false;
}
}
- cout<<"RESULT CORRECT: "<<equal<<endl;
+// cout<<"RESULT CORRECT: "<<equal<<endl;
}