From ca591a22fb1e3500567c3d0b730009b44ba33c2c Mon Sep 17 00:00:00 2001 From: bg Date: Sun, 20 Jan 2013 22:51:18 +0100 Subject: [PATCH] [shavs-test-suite] fixing bug with wrong reported buffer size --- test_src/main-keccak-test.c | 4 ++-- test_src/shavs.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test_src/main-keccak-test.c b/test_src/main-keccak-test.c index 501eb4b..127cb62 100644 --- a/test_src/main-keccak-test.c +++ b/test_src/main-keccak-test.c @@ -53,7 +53,7 @@ void test_256(void){ keccak_ctx_t ctx; keccak256_init(&ctx); keccak_nextBlock(&ctx, null); - // keccak_lastBlock(&ctx, data, 29); + keccak_lastBlock(&ctx, null, 29); keccak256_ctx2hash(hash, &ctx); cli_putstr_P(PSTR("\r\n testhash: ")); cli_hexdump(hash, 32); @@ -92,7 +92,7 @@ const cmdlist_entry_t cmdlist[] PROGMEM = { { NULL, NULL, NULL } }; -int main (void){ +int main(void){ main_setup(); shavs_algolist=(hfdesc_t**)algolist; diff --git a/test_src/shavs.c b/test_src/shavs.c index 84cf9f2..53fd488 100644 --- a/test_src/shavs.c +++ b/test_src/shavs.c @@ -200,7 +200,7 @@ void shavs_test1(void){ /* KAT tests */ shavs_ctx.buffersize_B=pgm_read_word(&(shavs_algo->blocksize_b))/8; uint8_t buffer[shavs_ctx.buffersize_B+5]; shavs_ctx.buffer = buffer; - fprintf_P(shavs_out_file, PSTR("\nbuffer_size = 0x%04"PRIx16" bytes")); + fprintf_P(shavs_out_file, PSTR("\nbuffer_size = 0x%04"PRIx16" bytes"), shavs_ctx.buffersize_B); for(;;){ shavs_ctx.blocks = 0; memset(buffer, 0, shavs_ctx.buffersize_B); -- 2.39.5