summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften')
-rw-r--r--Swiften/Serializer/PayloadSerializers/UnitTest/VCardSerializerTest.cpp2
-rw-r--r--Swiften/Serializer/PayloadSerializers/VCardSerializer.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/Swiften/Serializer/PayloadSerializers/UnitTest/VCardSerializerTest.cpp b/Swiften/Serializer/PayloadSerializers/UnitTest/VCardSerializerTest.cpp
index 11b24dc..82a3ec8 100644
--- a/Swiften/Serializer/PayloadSerializers/UnitTest/VCardSerializerTest.cpp
+++ b/Swiften/Serializer/PayloadSerializers/UnitTest/VCardSerializerTest.cpp
@@ -71,7 +71,7 @@ class VCardSerializerTest : public CppUnit::TestFixture
"<NICKNAME>DreamGirl</NICKNAME>"
"<PHOTO>"
"<TYPE>image/png</TYPE>"
- "<BINVAL>616263646566</BINVAL>"
+ "<BINVAL>YWJjZGVm</BINVAL>"
"</PHOTO>"
"<BDAY>1234</BDAY>"
"<MAILER>mutt</MAILER>"
diff --git a/Swiften/Serializer/PayloadSerializers/VCardSerializer.cpp b/Swiften/Serializer/PayloadSerializers/VCardSerializer.cpp
index 5953ef6..bb09469 100644
--- a/Swiften/Serializer/PayloadSerializers/VCardSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/VCardSerializer.cpp
@@ -11,7 +11,7 @@
#include "Swiften/Serializer/XML/XMLElement.h"
#include "Swiften/Serializer/XML/XMLTextNode.h"
#include "Swiften/Serializer/XML/XMLRawTextNode.h"
-#include "Swiften/StringCodecs/Hexify.h"
+#include "Swiften/StringCodecs/Base64.h"
#include "Swiften/Base/foreach.h"
namespace Swift {
@@ -96,7 +96,7 @@ String VCardSerializer::serializePayload(boost::shared_ptr<VCard> vcard) const
}
if (!vcard->getPhoto().isEmpty()) {
XMLElement::ref binvalElement(new XMLElement("BINVAL"));
- binvalElement->addNode(XMLTextNode::ref(new XMLTextNode(Hexify::hexify(vcard->getPhoto()))));
+ binvalElement->addNode(XMLTextNode::ref(new XMLTextNode(Base64::encode(vcard->getPhoto()))));
photoElement->addNode(binvalElement);
}
queryElement.addNode(photoElement);