diff options
author | Jonas Smedegaard <dr@jones.dk> | 2017-06-24 09:21:31 +0200 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2017-06-24 09:21:31 +0200 |
commit | c21cbbf9667991d2b928562a9c199e625d3f9bba (patch) | |
tree | ffd5e6895a578102ed9055fbb02a88031154ae0b /louloulibs/xmpp/auth.cpp | |
parent | de62b6456bebd130f98ce6192cd63ff42e654fac (diff) | |
parent | 23a3372144215c9ba7a30d599164677284813fa4 (diff) | |
download | biboumi-c21cbbf9667991d2b928562a9c199e625d3f9bba.tar.gz biboumi-c21cbbf9667991d2b928562a9c199e625d3f9bba.tar.bz2 biboumi-c21cbbf9667991d2b928562a9c199e625d3f9bba.tar.xz biboumi-c21cbbf9667991d2b928562a9c199e625d3f9bba.zip |
New upstream version 5.0
Diffstat (limited to 'louloulibs/xmpp/auth.cpp')
-rw-r--r-- | louloulibs/xmpp/auth.cpp | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/louloulibs/xmpp/auth.cpp b/louloulibs/xmpp/auth.cpp deleted file mode 100644 index c20f95d..0000000 --- a/louloulibs/xmpp/auth.cpp +++ /dev/null @@ -1,21 +0,0 @@ -#include <xmpp/auth.hpp> - -#include <utils/sha1.hpp> - -#include <iomanip> -#include <sstream> - -std::string get_handshake_digest(const std::string& stream_id, const std::string& secret) -{ - sha1nfo sha1; - sha1_init(&sha1); - sha1_write(&sha1, stream_id.data(), stream_id.size()); - sha1_write(&sha1, secret.data(), secret.size()); - const uint8_t* result = sha1_result(&sha1); - - std::ostringstream digest; - for (int i = 0; i < HASH_LENGTH; i++) - digest << std::hex << std::setfill('0') << std::setw(2) << static_cast<int>(result[i]); - - return digest.str(); -} |