X-Git-Url: https://git.cryptolib.org/?p=avr-crypto-lib.git;a=blobdiff_plain;f=test_src%2Fshavs.c;h=284544cee4dea5cd9a011993c30cb9ef7d392142;hp=5712be5f1c4f07e2eff3a1b47576fdde19306625;hb=45ad29acafe8ee17f7b1bd5b933a0e04cd51c94e;hpb=aa060d30f8600acb9cc5bcf9fa3d97a2fbe5ccda diff --git a/test_src/shavs.c b/test_src/shavs.c index 5712be5..284544c 100644 --- a/test_src/shavs.c +++ b/test_src/shavs.c @@ -291,10 +291,23 @@ void shavs_test1(void){ _delay_ms(500); cli_putstr_P(PSTR("\r\n starting last block")); + cli_putstr_P(PSTR("\r\n\tlength == ")); + cli_hexdump_rev(&length,4); + cli_putstr_P(PSTR("\r\n\tbuffersize_B == ")); + cli_hexdump_rev(&(shavs_ctx.buffersize_B),2); + uint16_t temp=length-(shavs_ctx.blocks)*((shavs_ctx.buffersize_B)*8); + cli_putstr_P(PSTR("\r\n\t (temp) == ")); + cli_hexdump_rev(&temp,2); + _delay_ms(500); +#endif +#if !DEBUG + uint16_t temp=length-(shavs_ctx.blocks)*((shavs_ctx.buffersize_B)*8); +// cli_putstr_P(PSTR("\r\n\t (temp) == ")); + cli_hexdump_rev(&temp,2); #endif - hfal_hash_lastBlock( &(shavs_ctx.ctx), - shavs_ctx.buffer, - length-(shavs_ctx.blocks)*((shavs_ctx.buffersize_B)*8)); + hfal_hash_lastBlock( &(shavs_ctx.ctx), buffer, /* be aware of freaking compilers!!! */ +// length-(shavs_ctx.blocks)*((shavs_ctx.buffersize_B)*8)); + temp ); #if DEBUG cli_putstr_P(PSTR("\r\n starting ctx2hash")); _delay_ms(500);