diff options
author | George Hazan <ghazan@miranda.im> | 2019-10-15 21:24:05 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-10-15 21:24:05 +0300 |
commit | b9080786be4ce7c18656a0421de6b9fd0b95d598 (patch) | |
tree | 055b56f6bf397f1d49d79d2b227a11485977c9a9 /protocols | |
parent | 33724ec73d87317bc58d4100898775712299a89c (diff) |
MBinBuffer::assign = function to replace buffer contents
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/WhatsAppWeb/src/server.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/protocols/WhatsAppWeb/src/server.cpp b/protocols/WhatsAppWeb/src/server.cpp index 8b183ab308..698cfa6d2e 100644 --- a/protocols/WhatsAppWeb/src/server.cpp +++ b/protocols/WhatsAppWeb/src/server.cpp @@ -135,7 +135,7 @@ bool WhatsAppProto::getBlob(const char *szSetting, MBinBuffer &buf) if (db_get(0, m_szModuleName, szSetting, &dbv)) return false; - buf.append(dbv.pbVal, dbv.cpbVal); + buf.assign(dbv.pbVal, dbv.cpbVal); db_free(&dbv); return true; } @@ -282,8 +282,8 @@ bool WhatsAppProto::ProcessSecret(const CMStringA &szSecret) dec_len += final_len; EVP_CIPHER_CTX_free(ctx); - enc_key.append(dec, 32); - mac_key.append(dec + 32, 32); + enc_key.assign(dec, 32); + mac_key.assign(dec + 32, 32); db_set_blob(0, m_szModuleName, DBKEY_ENC_KEY, enc_key.data(), (int)enc_key.length()); db_set_blob(0, m_szModuleName, DBKEY_MAC_KEY, mac_key.data(), (int)mac_key.length()); |