diff options
Diffstat (limited to 'Swiften/Component/ComponentHandshakeGenerator.cpp')
| -rw-r--r-- | Swiften/Component/ComponentHandshakeGenerator.cpp | 6 | 
1 files changed, 3 insertions, 3 deletions
diff --git a/Swiften/Component/ComponentHandshakeGenerator.cpp b/Swiften/Component/ComponentHandshakeGenerator.cpp index 79ba9b3..495d530 100644 --- a/Swiften/Component/ComponentHandshakeGenerator.cpp +++ b/Swiften/Component/ComponentHandshakeGenerator.cpp @@ -6,19 +6,19 @@  #include <Swiften/Component/ComponentHandshakeGenerator.h>  #include <Swiften/StringCodecs/Hexify.h> -#include <Swiften/StringCodecs/SHA1.h>  #include <Swiften/Base/String.h> +#include <Swiften/Crypto/CryptoProvider.h>  namespace Swift { -std::string ComponentHandshakeGenerator::getHandshake(const std::string& streamID, const std::string& secret) { +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, '<', "<");  	String::replaceAll(concatenatedString, '>', ">");  	String::replaceAll(concatenatedString, '\'', "'");  	String::replaceAll(concatenatedString, '"', """); -	return Hexify::hexify(SHA1::getHash(createByteArray(concatenatedString))); +	return Hexify::hexify(crypto->getSHA1Hash(createByteArray(concatenatedString)));  }  }  | 
 Swift