+void testrun_performance_sha256(void){
+ uint64_t t;
+ char str[16];
+ uint8_t data[32];
+ sha256_ctx_t ctx;
+
+ calibrateTimer();
+ print_overhead();
+
+ memset(data, 0, 32);
+
+ startTimer(1);
+ sha256_init(&ctx);
+ t = stopTimer();
+ uart_putstr_P(PSTR("\r\n\tctx-gen time: "));
+ ultoa((unsigned long)t, str, 10);
+ uart_putstr(str);
+
+
+ startTimer(1);
+ sha256_nextBlock(&ctx, data);
+ t = stopTimer();
+ uart_putstr_P(PSTR("\r\n\tone-block time: "));
+ ultoa((unsigned long)t, str, 10);
+ uart_putstr(str);
+
+
+ startTimer(1);
+ sha256_lastBlock(&ctx, data, 0);
+ t = stopTimer();
+ uart_putstr_P(PSTR("\r\n\tlast block time: "));
+ ultoa((unsigned long)t, str, 10);
+ uart_putstr(str);
+
+ uart_putstr_P(PSTR("\r\n"));
+}