NCryptIsAlgSupported function
The NCryptIsAlgSupported function determines if a CNG key storage provider supports a specific cryptographic algorithm.
Syntax
SECURITY_STATUS WINAPI NCryptIsAlgSupported( _In_ NCRYPT_PROV_HANDLE hProvider, _In_ LPCWSTR pszAlgId, _In_ DWORD dwFlags );
Parameters
- hProvider [in]
-
The handle of the key storage provider. This handle is obtained with the NCryptOpenStorageProvider function.
- pszAlgId [in]
-
A pointer to a null-terminated Unicode string that identifies the cryptographic algorithm in question. This can be one of the standard CNG Algorithm Identifiers or the identifier for another registered algorithm.
- dwFlags [in]
-
Flags that modify function behavior. This can be zero (0) or the following value.
Return value
Returns a status code that indicates the success or failure of the function.
Possible return codes include, but are not limited to, the following.
| Return code | Description |
|---|---|
|
The provider supports the specified algorithm. |
|
The dwFlags parameter contains one or more flags that are not supported. |
|
The handle specified by the hProvider parameter is not valid. |
|
One or more parameters are not valid. |
|
The provider does not support the specified algorithm. |
Remarks
If the provider supports the algorithm, this function returns ERROR_SUCCESS. If the provider does not support the algorithm, and no other errors occurred, this function returns NTE_NOT_SUPPORTED.
A service must not call this function from its StartService Function. If a service calls this function from its StartService function, a deadlock can occur, and the service may stop responding.
Requirements
|
Minimum supported client |
Windows Vista [desktop apps | Windows Store apps] |
|---|---|
|
Minimum supported server |
Windows Server 2008 [desktop apps | Windows Store apps] |
|
Header |
|
|
Library |
|
|
DLL |
|