NCryptIsAlgSupported function (ncrypt.h)
The NCryptIsAlgSupported function determines if a CNG key storage provider supports a specific cryptographic algorithm.
Syntax
SECURITY_STATUS NCryptIsAlgSupported(
[in] NCRYPT_PROV_HANDLE hProvider,
[in] LPCWSTR pszAlgId,
[in] DWORD dwFlags
);
Parameters
[in] hProvider
The handle of the key storage provider. This handle is obtained with the NCryptOpenStorageProvider function.
[in] pszAlgId
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.
[in] dwFlags
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
Requirement | Value |
---|---|
Minimum supported client | Windows Vista [desktop apps | UWP apps] |
Minimum supported server | Windows Server 2008 [desktop apps | UWP apps] |
Target Platform | Windows |
Header | ncrypt.h |
Library | Ncrypt.lib |
DLL | Ncrypt.dll |