aboutsummaryrefslogtreecommitdiffstats
path: root/src/security/digest/messageDigest.cpp
diff options
context:
space:
mode:
authorVincent Richard <[email protected]>2013-12-10 07:52:51 +0000
committerVincent Richard <[email protected]>2013-12-10 07:52:51 +0000
commit7e265b05f440ed81b80f2de496c9d13221a69fe0 (patch)
treed4dad210715ea9d60b2136bd416647d4bc02166a /src/security/digest/messageDigest.cpp
parentEnforce strict aliasing rule and avoid alignment issues. (diff)
downloadvmime-7e265b05f440ed81b80f2de496c9d13221a69fe0.tar.gz
vmime-7e265b05f440ed81b80f2de496c9d13221a69fe0.zip
Simplified types for better readability. Use appropriate types (size_t, byte_t...). Minor warning fixes.
Diffstat (limited to 'src/security/digest/messageDigest.cpp')
-rw-r--r--src/security/digest/messageDigest.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/security/digest/messageDigest.cpp b/src/security/digest/messageDigest.cpp
index 2cc11617..18fc8628 100644
--- a/src/security/digest/messageDigest.cpp
+++ b/src/security/digest/messageDigest.cpp
@@ -34,14 +34,14 @@ namespace digest {
const string messageDigest::getHexDigest() const
{
const byte_t* hash = getDigest();
- const int len = getDigestLength();
+ const size_t len = getDigestLength();
static const unsigned char hex[] = "0123456789abcdef";
std::ostringstream oss;
oss.imbue(std::locale::classic());
- for (int i = 0 ; i < len ; ++i)
+ for (size_t i = 0 ; i < len ; ++i)
{
oss << hex[(hash[i] & 0xf0) >> 4];
oss << hex[(hash[i] & 0x0f)];