summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Component/ComponentHandshakeGenerator.cpp')
-rw-r--r--Swiften/Component/ComponentHandshakeGenerator.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/Swiften/Component/ComponentHandshakeGenerator.cpp b/Swiften/Component/ComponentHandshakeGenerator.cpp
index a0eacab..647b3da 100644
--- a/Swiften/Component/ComponentHandshakeGenerator.cpp
+++ b/Swiften/Component/ComponentHandshakeGenerator.cpp
@@ -13,13 +13,13 @@
namespace Swift {
std::string ComponentHandshakeGenerator::getHandshake(const std::string& streamID, const std::string& secret, CryptoProvider* crypto) {
- std::string concatenatedString = streamID + secret;
- String::replaceAll(concatenatedString, '&', "&");
- String::replaceAll(concatenatedString, '<', "&lt;");
- String::replaceAll(concatenatedString, '>', "&gt;");
- String::replaceAll(concatenatedString, '\'', "&apos;");
- String::replaceAll(concatenatedString, '"', "&quot;");
- return Hexify::hexify(crypto->getSHA1Hash(createByteArray(concatenatedString)));
+ 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(crypto->getSHA1Hash(createByteArray(concatenatedString)));
}
}