diff options
author | George Hazan <ghazan@miranda.im> | 2022-10-05 21:52:15 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2022-10-05 21:52:15 +0300 |
commit | 92735a345ee6837a6c6b5941fd0d7cda7b7a8c2b (patch) | |
tree | 76ddc6cb543ced575b778169723ceac8ac66021d /protocols/WhatsAppWeb/src/utils.h | |
parent | eec4dbe75110ce06a44998ddaaa625d7e4378543 (diff) |
WhatsApp:
- all signal storage data extracted to the separate class MSignalStore;
- MSignalSession added to handle session ciphers
- signal store callbacks registered
- all libsignal related code moved to signal.cpp
Diffstat (limited to 'protocols/WhatsAppWeb/src/utils.h')
-rw-r--r-- | protocols/WhatsAppWeb/src/utils.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/protocols/WhatsAppWeb/src/utils.h b/protocols/WhatsAppWeb/src/utils.h index d3adfb3dc7..5428eb8188 100644 --- a/protocols/WhatsAppWeb/src/utils.h +++ b/protocols/WhatsAppWeb/src/utils.h @@ -169,6 +169,10 @@ struct WAJid std::string encodeBigEndian(uint32_t num, size_t len = sizeof(uint32_t)); void generateIV(uint8_t *iv, int &pVar); +__forceinline bool operator<<(MessageLite &msg, const MBinBuffer &buf) +{ return msg.ParseFromArray(buf.data(), (int)buf.length()); +} + unsigned char* HKDF(const EVP_MD *evp_md, const unsigned char *salt, size_t salt_len, const unsigned char *key, size_t key_len, |