diff options
author | George Hazan <george.hazan@gmail.com> | 2013-11-14 20:55:33 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-11-14 20:55:33 +0000 |
commit | 3e7e95559dd76e836d7e2bfa50719ea289b22cc6 (patch) | |
tree | 33aee2259474c70d08f990d39e4e355886fad1ed /include | |
parent | 4db4db4906537390e5371a83130ffd7d180ac000 (diff) |
MS_CRYPTO_ENUM_PROVIDERS: service to get list of crypto providers
git-svn-id: http://svn.miranda-ng.org/main/trunk@6906 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'include')
-rw-r--r-- | include/m_crypto.h | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/include/m_crypto.h b/include/m_crypto.h index 9cd971b5bd..1f7d782113 100644 --- a/include/m_crypto.h +++ b/include/m_crypto.h @@ -52,10 +52,11 @@ struct MICryptoEngine STDMETHOD_(WCHAR*, decodeStringW)(const BYTE *pBuf, size_t bufLen, size_t *cbResultLen) PURE;
};
-//registers a crypto provider v0.94+
-//wParam = (int)hLangpack
-//lParam = (CRYPTO_PROVIDER*)
-//returns HANDLE on success or NULL on failure
+/////////////////////////////////////////////////////////////////////////////////////////
+// registers a crypto provider v0.94+
+// wParam = (int)hLangpack
+// lParam = (CRYPTO_PROVIDER*)
+// returns HANDLE on success or NULL on failure
typedef MICryptoEngine* (__cdecl *pfnCryptoProviderFactory)(void);
@@ -83,7 +84,7 @@ typedef struct tagCRYPTOPROVIDER }
CRYPTO_PROVIDER;
-#define MS_CRYPTO_REGISTER_ENGINE "SRCrypto/RegisterEngine"
+#define MS_CRYPTO_REGISTER_ENGINE "Crypto/RegisterEngine"
__forceinline HANDLE Crypto_RegisterEngine(CRYPTO_PROVIDER *pProvider)
{
@@ -91,4 +92,17 @@ __forceinline HANDLE Crypto_RegisterEngine(CRYPTO_PROVIDER *pProvider) return (HANDLE)CallService(MS_CRYPTO_REGISTER_ENGINE, hLangpack, (LPARAM)pProvider);
}
+///////////////////////////////////////////////////////////////////////////////////////////////
+// retrieves list of all available crypto providers
+// wParam = (WPARAM)(int*)piNumProviders
+// lParam = (CRYPTO_PROVIDER***)pointer to an array of CRYPTO_PROVIDER*
+// always returns 0
+
+#define MS_CRYPTO_ENUM_PROVIDERS "Crypto/EnumProviders"
+
+__forceinline void Crypto_EnumProviders(int *numProvs, CRYPTO_PROVIDER ***pResult)
+{
+ CallService(MS_CRYPTO_ENUM_PROVIDERS, WPARAM(numProvs), LPARAM(pResult));
+}
+
#endif // M_CRYPTO_H__
|