summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-02-14 18:57:18 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-02-14 21:36:32 (GMT)
commitcb05f5a908e20006c954ce38755c2e422ecc2388 (patch)
treea793551a5fe279a57d4330119560e8542f745484 /Swiften/Component/ComponentHandshakeGenerator.cpp
parentcad974b45c0fb9355e68d9728e42c9ae3dbcebc7 (diff)
downloadswift-contrib-cb05f5a908e20006c954ce38755c2e422ecc2388.zip
swift-contrib-cb05f5a908e20006c954ce38755c2e422ecc2388.tar.bz2
Removed Swift::String.
Diffstat (limited to 'Swiften/Component/ComponentHandshakeGenerator.cpp')
-rw-r--r--Swiften/Component/ComponentHandshakeGenerator.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/Swiften/Component/ComponentHandshakeGenerator.cpp b/Swiften/Component/ComponentHandshakeGenerator.cpp
index 422f986..4081420 100644
--- a/Swiften/Component/ComponentHandshakeGenerator.cpp
+++ b/Swiften/Component/ComponentHandshakeGenerator.cpp
@@ -7,16 +7,17 @@
#include "Swiften/Component/ComponentHandshakeGenerator.h"
#include "Swiften/StringCodecs/Hexify.h"
#include "Swiften/StringCodecs/SHA1.h"
+#include <Swiften/Base/String.h>
namespace Swift {
-String ComponentHandshakeGenerator::getHandshake(const String& streamID, const String& secret) {
- String concatenatedString = streamID + secret;
- concatenatedString.replaceAll('&', "&amp;");
- concatenatedString.replaceAll('<', "&lt;");
- concatenatedString.replaceAll('>', "&gt;");
- concatenatedString.replaceAll('\'', "&apos;");
- concatenatedString.replaceAll('"', "&quot;");
+std::string ComponentHandshakeGenerator::getHandshake(const std::string& streamID, const std::string& secret) {
+ std::string concatenatedString = streamID + secret;
+ String::replaceAll(concatenatedString, '&', "&amp;");
+ String::replaceAll(concatenatedString, '<', "&lt;");
+ String::replaceAll(concatenatedString, '>', "&gt;");
+ String::replaceAll(concatenatedString, '\'', "&apos;");
+ String::replaceAll(concatenatedString, '"', "&quot;");
return Hexify::hexify(SHA1::getHash(ByteArray(concatenatedString)));
}