]> git.cryptolib.org Git - avr-crypto-lib.git/blobdiff - sha1.c
restructuring Makefile +hmac-sha1
[avr-crypto-lib.git] / sha1.c
diff --git a/sha1.c b/sha1.c
index 7982412b1ca91d05873db0fef9e657574343a12d..89e9f8d5e5138000fcb96e44d0aba485a2b4e323 100644 (file)
--- 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);