summaryrefslogtreecommitdiff
path: root/protocols/WhatsApp/src/WhatsAPI++/WALogin.h
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-01-24 16:35:14 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-01-24 16:35:14 +0000
commitc47ca004ba979d23a86211393c9e35deadd66c46 (patch)
treece49a57e87bf5caac81d2d54a590e3aea3d61ea3 /protocols/WhatsApp/src/WhatsAPI++/WALogin.h
parent126f606ea6a845d914e3ff074dc725443bb57bf0 (diff)
adaptation of WhatsApp for protocol version 1.5/2.0
git-svn-id: http://svn.miranda-ng.org/main/trunk@11898 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/WhatsApp/src/WhatsAPI++/WALogin.h')
-rw-r--r--protocols/WhatsApp/src/WhatsAPI++/WALogin.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/protocols/WhatsApp/src/WhatsAPI++/WALogin.h b/protocols/WhatsApp/src/WhatsAPI++/WALogin.h
index 868e806880..2949213e53 100644
--- a/protocols/WhatsApp/src/WhatsAPI++/WALogin.h
+++ b/protocols/WhatsApp/src/WhatsAPI++/WALogin.h
@@ -23,15 +23,15 @@ class BinTreeNodeWriter;
class KeyStream {
private:
RC4_KEY rc4;
- HMAC_CTX hmac;
- unsigned char* key;
- int keyLength;
+ unsigned char key[20], keyMac[20];
+ int seq;
+ HMAC_CTX hmac;
void hmacsha1(unsigned char* text, int textLength, unsigned char *out);
public:
- KeyStream(unsigned char* key, size_t keyLegnth);
- virtual ~KeyStream();
+ KeyStream(unsigned char* _key, unsigned char* _keyMac);
+ ~KeyStream();
static void keyFromPasswordAndNonce(const std::string& pass, const std::vector<unsigned char>& nonce, unsigned char *out);
void decodeMessage(unsigned char* buffer, int macOffset, int offset, const int length);
@@ -54,7 +54,6 @@ private:
std::vector<unsigned char>* readFeaturesUntilChallengeOrSuccess();
void parseSuccessNode(ProtocolTreeNode* node);
std::vector<unsigned char> readSuccess();
- std::string getResponse(const std::string& challenge);
public:
std::string user;