aboutsummaryrefslogtreecommitdiffstats
path: root/src/security/digest
diff options
context:
space:
mode:
Diffstat (limited to 'src/security/digest')
-rw-r--r--src/security/digest/md5/md5MessageDigest.cpp4
-rw-r--r--src/security/digest/sha1/sha1MessageDigest.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/security/digest/md5/md5MessageDigest.cpp b/src/security/digest/md5/md5MessageDigest.cpp
index 84ca99ae..f803a6e4 100644
--- a/src/security/digest/md5/md5MessageDigest.cpp
+++ b/src/security/digest/md5/md5MessageDigest.cpp
@@ -211,8 +211,8 @@ void md5MessageDigest::finalize()
memset(p, 0, padding);
- reinterpret_cast <vmime_uint32*>(m_block)[14] = (m_byteCount << 3);
- reinterpret_cast <vmime_uint32*>(m_block)[15] = (m_byteCount >> 29);
+ reinterpret_cast <vmime_uint32*>(m_block)[14] = static_cast <vmime_uint32>(m_byteCount << 3);
+ reinterpret_cast <vmime_uint32*>(m_block)[15] = static_cast <vmime_uint32>(m_byteCount >> 29);
#if VMIME_BYTE_ORDER_BIG_ENDIAN
swapUint32Array((vmime_uint32*) m_block, (64 - 8) / 4);
diff --git a/src/security/digest/sha1/sha1MessageDigest.cpp b/src/security/digest/sha1/sha1MessageDigest.cpp
index e4bcea41..3fb102ff 100644
--- a/src/security/digest/sha1/sha1MessageDigest.cpp
+++ b/src/security/digest/sha1/sha1MessageDigest.cpp
@@ -108,10 +108,10 @@ void sha1MessageDigest::update(const byte_t* buffer, const unsigned long len)
j = (m_count[0] >> 3) & 63;
- if ((m_count[0] += len << 3) < (len << 3))
+ if ((m_count[0] += static_cast <unsigned int>(len << 3)) < static_cast <unsigned int>(len << 3))
m_count[1]++;
- m_count[1] += (len >> 29);
+ m_count[1] += static_cast <unsigned int>(len >> 29);
if ((j + len) > 63)
{