diff --git a/src/libsodium/crypto_hash/sha256/cp/hash_sha256_cp.c b/src/libsodium/crypto_hash/sha256/cp/hash_sha256_cp.c index 302d32a1..264054f9 100644 --- a/src/libsodium/crypto_hash/sha256/cp/hash_sha256_cp.c +++ b/src/libsodium/crypto_hash/sha256/cp/hash_sha256_cp.c @@ -153,10 +153,10 @@ static const uint8_t PAD[64] = { 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, static void SHA256_Pad(crypto_hash_sha256_state *state, uint32_t tmp32[64 + 8]) { - uint64_t r; - uint64_t i; + unsigned int r; + unsigned int i; - r = (state->count >> 3) & 0x3f; + r = (unsigned int) ((state->count >> 3) & 0x3f); if (r < 56) { for (i = 0; i < 56 - r; i++) { state->buf[r + i] = PAD[i]; diff --git a/src/libsodium/crypto_hash/sha512/cp/hash_sha512_cp.c b/src/libsodium/crypto_hash/sha512/cp/hash_sha512_cp.c index 8d0f2536..8e0f36fb 100644 --- a/src/libsodium/crypto_hash/sha512/cp/hash_sha512_cp.c +++ b/src/libsodium/crypto_hash/sha512/cp/hash_sha512_cp.c @@ -172,10 +172,10 @@ static const uint8_t PAD[128] = { static void SHA512_Pad(crypto_hash_sha512_state *state, uint64_t tmp64[80 + 8]) { - uint64_t r; - uint64_t i; + unsigned int r; + unsigned int i; - r = (state->count[1] >> 3) & 0x7f; + r = (unsigned int) ((state->count[1] >> 3) & 0x7f); if (r < 112) { for (i = 0; i < 112 - r; i++) { state->buf[r + i] = PAD[i];