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; }