X-Git-Url: https://git.cryptolib.org/?a=blobdiff_plain;f=hfal-performance.c;h=5108f2544d7ad5a8ef5276b7e1440b8411a35cfc;hb=2deab9197b8d9d74c01156777b250746c36fba07;hp=391fac8508a0b857bb3f02f76a66119518ec4a9a;hpb=7605b81a4b6f8b2bf7065e9b51116443a1ce64c4;p=avr-crypto-lib.git diff --git a/hfal-performance.c b/hfal-performance.c index 391fac8..5108f25 100644 --- a/hfal-performance.c +++ b/hfal-performance.c @@ -69,26 +69,34 @@ void hfal_performance(const hfdesc_t* hd){ cli_putstr_P(PSTR("\r\n blocksize (bits): ")); printvalue(hf.blocksize_b); - startTimer(1); + startTimer(0); + START_TIMER; hf.init(&ctx); + STOP_TIMER; t = stopTimer(); cli_putstr_P(PSTR("\r\n init (cycles): ")); printvalue(t); - startTimer(1); + startTimer(0); + START_TIMER; hf.nextBlock(&ctx, data); + STOP_TIMER; t = stopTimer(); cli_putstr_P(PSTR("\r\n nextBlock (cycles): ")); printvalue(t); - startTimer(1); + startTimer(0); + START_TIMER; hf.lastBlock(&ctx, data, 0); + STOP_TIMER; t = stopTimer(); cli_putstr_P(PSTR("\r\n lastBlock (cycles): ")); printvalue(t); - startTimer(1); + startTimer(0); + START_TIMER; hf.ctx2hash(digest, &ctx); + STOP_TIMER; t = stopTimer(); cli_putstr_P(PSTR("\r\n ctx2hash (cycles): ")); printvalue(t);