summaryrefslogtreecommitdiff
path: root/include/m_crypto.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/m_crypto.h')
-rw-r--r--include/m_crypto.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/m_crypto.h b/include/m_crypto.h
index 1f7d782113..87e2a61614 100644
--- a/include/m_crypto.h
+++ b/include/m_crypto.h
@@ -105,4 +105,17 @@ __forceinline void Crypto_EnumProviders(int *numProvs, CRYPTO_PROVIDER ***pResul
CallService(MS_CRYPTO_ENUM_PROVIDERS, WPARAM(numProvs), LPARAM(pResult));
}
+///////////////////////////////////////////////////////////////////////////////////////////////
+// retrieves a crypto provider by name
+// wParam = 0 (unused)
+// lParam = (const char*)pszProviderName = CRYPTO_PROVIDER::pszName
+// returns 0 on fail or CRYPTO_PROVIDER* on success
+
+#define MS_CRYPTO_GET_PROVIDER "Crypto/GetProvider"
+
+__forceinline CRYPTO_PROVIDER* Crypto_GetProvider(const char *pszName)
+{
+ return (CRYPTO_PROVIDER*)CallService(MS_CRYPTO_GET_PROVIDER, 0, LPARAM(pszName));
+}
+
#endif // M_CRYPTO_H__