aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/pop3/POP3Store.cpp
diff options
context:
space:
mode:
authorVincent Richard <[email protected]>2005-09-06 20:08:39 +0000
committerVincent Richard <[email protected]>2005-09-06 20:08:39 +0000
commit3b1fcbe825c90dcb5e358ad7632b45d4cd512f54 (patch)
tree183d183a49b40058a300a7832cfe02c91ec5cab8 /src/net/pop3/POP3Store.cpp
parentAdded progression notifications. (diff)
downloadvmime-3b1fcbe825c90dcb5e358ad7632b45d4cd512f54.tar.gz
vmime-3b1fcbe825c90dcb5e358ad7632b45d4cd512f54.zip
New namespace for message digest algorithms.
Diffstat (limited to 'src/net/pop3/POP3Store.cpp')
-rw-r--r--src/net/pop3/POP3Store.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/net/pop3/POP3Store.cpp b/src/net/pop3/POP3Store.cpp
index 9ccfa7b7..5041d2d3 100644
--- a/src/net/pop3/POP3Store.cpp
+++ b/src/net/pop3/POP3Store.cpp
@@ -23,7 +23,7 @@
#include "vmime/exception.hpp"
#include "vmime/platformDependant.hpp"
#include "vmime/messageId.hpp"
-#include "vmime/utility/md5.hpp"
+#include "vmime/security/digest/messageDigestFactory.hpp"
#include "vmime/utility/filteredStream.hpp"
#include <algorithm>
@@ -145,8 +145,13 @@ void POP3Store::connect()
if (mid.getLeft().length() && mid.getRight().length())
{
// <digest> is the result of MD5 applied to "<message-id>password"
- sendRequest("APOP " + auth.getUsername() + " "
- + utility::md5(mid.generate() + auth.getPassword()).hex());
+ ref <security::digest::messageDigest> md5 =
+ security::digest::messageDigestFactory::getInstance()->create("md5");
+
+ md5->update(mid.generate() + auth.getPassword());
+ md5->finalize();
+
+ sendRequest("APOP " + auth.getUsername() + " " + md5->getHexDigest());
readResponse(response, false);
if (isSuccessResponse(response))