diff options
author | George Hazan <ghazan@miranda.im> | 2018-05-22 19:39:57 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-05-22 19:39:57 +0300 |
commit | d01ef0db6be8b7cb45eef8f41d69fd4e567cb7cf (patch) | |
tree | 6c33c392793e11f06024ae55c7f658a3cae7d0b3 /src | |
parent | f56d89298e23be23b16efd33fc375eb4a9971c12 (diff) |
m_crypto.h => CMPlugin
Diffstat (limited to 'src')
-rw-r--r-- | src/core/stdcrypt/src/encrypt.cpp | 5 | ||||
-rw-r--r-- | src/mir_app/src/encrypt.cpp | 8 |
2 files changed, 7 insertions, 6 deletions
diff --git a/src/core/stdcrypt/src/encrypt.cpp b/src/core/stdcrypt/src/encrypt.cpp index 6721f733a2..1fe6cd083b 100644 --- a/src/core/stdcrypt/src/encrypt.cpp +++ b/src/core/stdcrypt/src/encrypt.cpp @@ -209,8 +209,9 @@ int LoadEncryptionModule(void) {
CRYPTO_PROVIDER cp = { sizeof(cp) };
cp.pszName = "AES (Rjindale)";
- cp.pszDescr = LPGEN("Standard crypto provider");
+ cp.szDescr.a = LPGEN("Standard crypto provider");
cp.pFactory = builder;
- Crypto_RegisterEngine(&cp);
+ cp.iLangId = g_plugin.m_hLang;
+ CallService(MS_CRYPTO_REGISTER_ENGINE, 0, LPARAM(&cp));
return 0;
}
diff --git a/src/mir_app/src/encrypt.cpp b/src/mir_app/src/encrypt.cpp index 48464f8258..b31f2c6d3e 100644 --- a/src/mir_app/src/encrypt.cpp +++ b/src/mir_app/src/encrypt.cpp @@ -32,7 +32,7 @@ static int CompareFunc(const CRYPTO_PROVIDER *p1, const CRYPTO_PROVIDER *p2) static LIST<CRYPTO_PROVIDER> arProviders(5, CompareFunc);
-static INT_PTR srvRegister(WPARAM wParam, LPARAM lParam)
+static INT_PTR srvRegister(WPARAM, LPARAM lParam)
{
CRYPTO_PROVIDER *p = (CRYPTO_PROVIDER*)lParam;
if (p == nullptr || p->dwSize != sizeof(CRYPTO_PROVIDER))
@@ -41,9 +41,9 @@ static INT_PTR srvRegister(WPARAM wParam, LPARAM lParam) CRYPTO_PROVIDER *pNew = new CRYPTO_PROVIDER(*p);
pNew->pszName = mir_strdup(p->pszName);
if (pNew->dwFlags & CPF_UNICODE)
- pNew->ptszDescr = mir_wstrdup(TranslateW_LP(p->pwszDescr, wParam));
+ pNew->szDescr.w = mir_wstrdup(TranslateW_LP(p->szDescr.w, p->iLangId));
else
- pNew->ptszDescr = mir_a2u(TranslateA_LP(p->pszDescr, wParam));
+ pNew->szDescr.w = mir_a2u(TranslateA_LP(p->szDescr.a, p->iLangId));
arProviders.insert(pNew);
return 0;
}
@@ -81,7 +81,7 @@ void UninitCrypt(void) {
for (auto &p : arProviders) {
mir_free(p->pszName);
- mir_free(p->pszDescr);
+ mir_free(p->szDescr.w);
delete p;
}
}
|