//t=TimeStart();
//256
//avant ecb
+ for(int i=0;i<nb_test;i++)
+ {
+
if(ctr) {
if(1 != EVP_EncryptInit_ex(ctx, EVP_aes_128_ctr(), NULL, key, iv))
handleErrors();
double t=0;
t=TimeStart();
*/
- for(int i=0;i<nb_test;i++)
- {
if(1 != EVP_EncryptUpdate(ctx, ciphertext, &len, plaintext, plaintext_len))
handleErrors();
ciphertext_len = len;
- }
+
/* time+=TimeStop(t);
// if(index==nb_test-1)
printf("Time encrypt %f\n",time);
*/
if(1 != EVP_EncryptFinal_ex(ctx, ciphertext + len, &len)) handleErrors();
ciphertext_len += len;
-
+ }
/* Clean up */
EVP_CIPHER_CTX_free(ctx);