Files
@ 34ec0df769f1
Branch filter:
Location: libtransport.git/src/tests/util.cpp - annotation
34ec0df769f1
1.2 KiB
text/x-c++hdr
avoid WTF-8.
what arrives from XMPP is already UTF-8 encoded, so applying UTF-8 again
produces somewhat unfortunate results.
this line is not always necessary. before this change, the code was
dependent on the locale.
what arrives from XMPP is already UTF-8 encoded, so applying UTF-8 again
produces somewhat unfortunate results.
this line is not always necessary. before this change, the code was
dependent on the locale.
f6b01c4f4d6e f6b01c4f4d6e f6b01c4f4d6e f6b01c4f4d6e f6b01c4f4d6e f6b01c4f4d6e f6b01c4f4d6e f6b01c4f4d6e f6b01c4f4d6e f6b01c4f4d6e f6b01c4f4d6e f6b01c4f4d6e f6b01c4f4d6e f6b01c4f4d6e f6b01c4f4d6e f6b01c4f4d6e f6b01c4f4d6e f6b01c4f4d6e f6b01c4f4d6e f6b01c4f4d6e f6b01c4f4d6e f6b01c4f4d6e f6b01c4f4d6e f6b01c4f4d6e f6b01c4f4d6e f6b01c4f4d6e f6b01c4f4d6e f6b01c4f4d6e f6b01c4f4d6e f6b01c4f4d6e f6b01c4f4d6e f6b01c4f4d6e f6b01c4f4d6e f6b01c4f4d6e f6b01c4f4d6e f6b01c4f4d6e f6b01c4f4d6e f6b01c4f4d6e f6b01c4f4d6e f6b01c4f4d6e f6b01c4f4d6e f6b01c4f4d6e f6b01c4f4d6e f6b01c4f4d6e f6b01c4f4d6e | #include "transport/userregistry.h"
#include "transport/config.h"
#include "transport/storagebackend.h"
#include "transport/user.h"
#include "transport/transport.h"
#include "transport/conversation.h"
#include "transport/usermanager.h"
#include "transport/localbuddy.h"
#include <cppunit/TestFixture.h>
#include <cppunit/extensions/HelperMacros.h>
#include <Swiften/Swiften.h>
#include <Swiften/EventLoop/DummyEventLoop.h>
#include <Swiften/Server/Server.h>
#include <Swiften/Network/DummyNetworkFactories.h>
#include <Swiften/Network/DummyConnectionServer.h>
#include "Swiften/Server/ServerStanzaChannel.h"
#include "Swiften/Server/ServerFromClientSession.h"
#include "Swiften/Parser/PayloadParsers/FullPayloadParserFactoryCollection.h"
#include "basictest.h"
#include "transport/util.h"
using namespace Transport;
class UtilTest : public CPPUNIT_NS :: TestFixture{
CPPUNIT_TEST_SUITE(UtilTest);
CPPUNIT_TEST(encryptDecryptPassword);
CPPUNIT_TEST_SUITE_END();
public:
void setUp (void) {
}
void tearDown (void) {
}
void encryptDecryptPassword() {
std::string encrypted = Util::encryptPassword("password", "key");
CPPUNIT_ASSERT_EQUAL(std::string("password"), Util::decryptPassword(encrypted, "key"));
}
};
CPPUNIT_TEST_SUITE_REGISTRATION (UtilTest);
|