diff options
Diffstat (limited to 'protocols/WhatsApp/src/utils.cpp')
-rw-r--r-- | protocols/WhatsApp/src/utils.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/protocols/WhatsApp/src/utils.cpp b/protocols/WhatsApp/src/utils.cpp index c635061994..96e8ee18f3 100644 --- a/protocols/WhatsApp/src/utils.cpp +++ b/protocols/WhatsApp/src/utils.cpp @@ -55,7 +55,6 @@ std::string getLastErrorMsg() // Retrieve the system error message for the last-error code
LPVOID lpMsgBuf;
- LPVOID lpDisplayBuf;
DWORD dw = WSAGetLastError();
FormatMessageA(
@@ -103,4 +102,13 @@ int utils::debug::log(std::string file_name, std::string text) out.close();
return EXIT_SUCCESS;
-}
\ No newline at end of file +}
+
+BYTE* utils::md5string(const BYTE *data, int size, BYTE *digest)
+{
+ mir_md5_state_t md5_state;
+ mir_md5_init(&md5_state);
+ mir_md5_append(&md5_state, data, size);
+ mir_md5_finish(&md5_state, digest);
+ return digest;
+}
|