From ded3e54221c0663aa495882402b095d2d2a3b9c5 Mon Sep 17 00:00:00 2001 From: WolverinDEV Date: Sun, 7 Jul 2019 18:37:05 +0200 Subject: [PATCH] Updated changelog --- src/protocol/CryptionHandler.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/protocol/CryptionHandler.cpp b/src/protocol/CryptionHandler.cpp index ed3318d..8c4e21f 100644 --- a/src/protocol/CryptionHandler.cpp +++ b/src/protocol/CryptionHandler.cpp @@ -142,8 +142,12 @@ bool CryptionHandler::setupSharedSecretNew(const std::string &alpha, const std:: memcpy(this->iv_struct, sharedIv.data(), 64); this->iv_struct_length = 64; - auto digest_buffer = digest::sha1((char*) this->iv_struct, 64); - memcpy(this->current_mac, digest_buffer.data(), 8); + uint8_t mac_buffer[SHA_DIGEST_LENGTH]; + digest::sha1((const char*) this->iv_struct, 64, mac_buffer); + memcpy(this->current_mac, mac_buffer, 8); + + //auto digest_buffer = digest::sha1((char*) this->iv_struct, 64); + //memcpy(this->current_mac, digest_buffer.data(), 8); this->useDefaultChipherKeyNonce = false; }