]> git.cryptolib.org Git - avr-crypto-lib.git/blobdiff - hfal-performance.c
adding modulo-reduction to bigint
[avr-crypto-lib.git] / hfal-performance.c
index 8c5b36db6dc5dac7fd8ff6d443d460333bd28eb7..9bfaa8504c934e2db5e37f025ee5e1b52b380bb7 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);
+       }
 }