diff options
| author | Vincent Richard <[email protected]> | 2008-10-12 10:05:28 +0000 |
|---|---|---|
| committer | Vincent Richard <[email protected]> | 2008-10-12 10:05:28 +0000 |
| commit | 3f4226eaac5d0d30be1f4ca5d5cf010c98a7ce7d (patch) | |
| tree | 1968196db0d6ae27fd70d0732ff3defed0efb61f /src/security/digest/sha1/sha1MessageDigest.cpp | |
| parent | Encode '?' characters to avoid breaking QP encoding (Zarafa). (diff) | |
| download | vmime-3f4226eaac5d0d30be1f4ca5d5cf010c98a7ce7d.tar.gz vmime-3f4226eaac5d0d30be1f4ca5d5cf010c98a7ce7d.zip | |
Fixed compilation warnings.
Diffstat (limited to 'src/security/digest/sha1/sha1MessageDigest.cpp')
| -rw-r--r-- | src/security/digest/sha1/sha1MessageDigest.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/security/digest/sha1/sha1MessageDigest.cpp b/src/security/digest/sha1/sha1MessageDigest.cpp index b86cb996..a51e250d 100644 --- a/src/security/digest/sha1/sha1MessageDigest.cpp +++ b/src/security/digest/sha1/sha1MessageDigest.cpp @@ -26,6 +26,8 @@ #include "vmime/security/digest/sha1/sha1MessageDigest.hpp" +#include <cstring> + namespace vmime { namespace security { @@ -126,7 +128,7 @@ void sha1MessageDigest::update(const byte_t* buffer, const unsigned long len) i = 0; } - memcpy(&m_buffer[j], &buffer[i], len - i); + std::memcpy(&m_buffer[j], &buffer[i], len - i); } @@ -158,10 +160,10 @@ void sha1MessageDigest::finalize() // Wipe variables i = j = 0; - memset(m_buffer, 0, 64); - memset(m_state, 0, 20); - memset(m_count, 0, 8); - memset(&finalcount, 0, 8); + std::memset(m_buffer, 0, 64); + std::memset(m_state, 0, 20); + std::memset(m_count, 0, 8); + std::memset(&finalcount, 0, 8); } @@ -246,7 +248,7 @@ void sha1MessageDigest::transform } -const int sha1MessageDigest::getDigestLength() const +int sha1MessageDigest::getDigestLength() const { return 20; } |
