X-Git-Url: https://git.cryptolib.org/?a=blobdiff_plain;f=sha1.c;h=89e9f8d5e5138000fcb96e44d0aba485a2b4e323;hb=3b6caf79acc2653f594f2a62d4c220f78660d89e;hp=7982412b1ca91d05873db0fef9e657574343a12d;hpb=96ebafd201c9e8441c7677577b24aa402c1defc6;p=avr-crypto-lib.git diff --git a/sha1.c b/sha1.c index 7982412..89e9f8d 100644 --- a/sha1.c +++ b/sha1.c @@ -227,7 +227,7 @@ void sha1 (sha1_hash_t *dest, void* msg, uint32_t length){ while(length & (~0x0001ff)){ /* length>=512 */ DEBUG_S("\r\none block"); sha1_nextBlock(&s, msg); - msg += SHA1_BLOCK_BITS/8; /* increment pointer to next block */ + msg = (uint8_t*)msg + SHA1_BLOCK_BITS/8; /* increment pointer to next block */ length -= SHA1_BLOCK_BITS; } sha1_lastBlock(&s, msg, length);