X-Git-Url: https://git.cryptolib.org/?a=blobdiff_plain;f=hfal-basic.c;h=551a8bc18b7d0103d8ba46036e01382f047e485b;hb=02ac3b653f3a11f284cc1a0cb0e983575f2f431b;hp=17b1765e97f58e3eaaf9274aab626ace38d70ab0;hpb=e1cb3a050dbdb395e9d87f954d754046481b82f7;p=avr-crypto-lib.git diff --git a/hfal-basic.c b/hfal-basic.c index 17b1765..551a8bc 100644 --- a/hfal-basic.c +++ b/hfal-basic.c @@ -72,19 +72,19 @@ void hfal_hash_mem(const hfdesc_t* hash_descriptor, void* dest, const void* msg, }else{ uint16_t bs,bsb; uint8_t ctx[pgm_read_word(&(hash_descriptor->ctxsize_B))]; - f=(void_fpt)pgm_read_word(&(hash_descriptor->init)); + f=(void_fpt)(pgm_read_word(&(hash_descriptor->init))); ((hf_init_fpt)f)(ctx); bs=pgm_read_word(&(hash_descriptor->blocksize_b)); bsb=bs/8; - f=(void_fpt)pgm_read_word(&(hash_descriptor->nextBlock)); - while(length_b>=bs){ + f=(void_fpt)(pgm_read_word(&(hash_descriptor->nextBlock))); + while(length_b>bs){ ((hf_nextBlock_fpt)f)(ctx, msg); length_b -= bs; msg = (uint8_t*)msg + bsb; } - f=(void_fpt)pgm_read_word(&(hash_descriptor->lastBlock)); + f=(void_fpt)(pgm_read_word(&(hash_descriptor->lastBlock))); ((hf_lastBlock_fpt)f)(ctx, msg, length_b); - f=(void_fpt)pgm_read_word(&(hash_descriptor->ctx2hash)); + f=(void_fpt)(pgm_read_word(&(hash_descriptor->ctx2hash))); ((hf_ctx2hash_fpt)f)(dest, ctx); } }