]> git.cryptolib.org Git - avr-crypto-lib.git/blobdiff - hfal-performance.c
changing performance measurment of blockciphers to bcal
[avr-crypto-lib.git] / hfal-performance.c
index 8c5b36db6dc5dac7fd8ff6d443d460333bd28eb7..c64e7e962fbed888c528d8bfb64ad199a6a6b212 100644 (file)
@@ -79,6 +79,9 @@ void hfal_performance(const hfdesc_t* hd){
                hf.init(&ctx);
                STOP_TIMER;
                t += stopTimer();
+               if(i!=31 && hf.free){
+                       hf.free(&ctx)
+               }
        }
        t>>=5;
        cli_putstr_P(PSTR("\r\n    init (cycles):      "));
@@ -119,6 +122,10 @@ void hfal_performance(const hfdesc_t* hd){
        t>>=5;
        cli_putstr_P(PSTR("\r\n    ctx2hash (cycles):  "));
        printvalue(t);
+
+       if(hf.free){
+               hf.free(&ctx);
+       }
 }