X-Git-Url: https://git.cryptolib.org/?a=blobdiff_plain;f=sha256.c;h=bf9103bae3f25121ba52d8fcd31cde47f552845d;hb=158bb85c89631984291c93a9217ca84345349a46;hp=30ab0a53494a6aff4cb147b119c796681b264723;hpb=6e51024d966bd015cb8f9c8460c5c21da6a08f9e;p=avr-crypto-lib.git diff --git a/sha256.c b/sha256.c index 30ab0a5..bf9103b 100644 --- a/sha256.c +++ b/sha256.c @@ -185,7 +185,7 @@ void sha256(sha256_hash_t *dest, void* msg, uint32_t length){ /* length could be sha256_init(&s); while(length >= SHA256_BLOCK_BITS){ sha256_nextBlock(&s, msg); - msg += SHA256_BLOCK_BITS/8; + msg = (uint8_t*)msg + SHA256_BLOCK_BITS/8; length -= SHA256_BLOCK_BITS; } sha256_lastBlock(&s, msg, length);