NCryptEnumAlgorithms function (ncrypt.h)
The NCryptEnumAlgorithms function obtains the names of the algorithms that are supported by the specified key storage provider.
Syntax
SECURITY_STATUS NCryptEnumAlgorithms(
[in] NCRYPT_PROV_HANDLE hProvider,
[in] DWORD dwAlgOperations,
[out] DWORD *pdwAlgCount,
[out] NCryptAlgorithmName **ppAlgList,
[in] DWORD dwFlags
);
Parameters
[in] hProvider
The handle of the key storage provider to enumerate the algorithms for. This handle is obtained with the NCryptOpenStorageProvider function.
[in] dwAlgOperations
A set of values that determine which algorithm classes to enumerate. This can be zero or a combination of one or more of the following values. If dwAlgOperations is zero, all algorithms are enumerated.
[out] pdwAlgCount
The address of a DWORD that receives the number of elements in the ppAlgList array.
[out] ppAlgList
The address of an NCryptAlgorithmName structure pointer that receives an array of the registered algorithm names. The variable pointed to by the pdwAlgCount parameter receives the number of elements in this array.
When this memory is no longer needed, it must be freed by passing this pointer to the NCryptFreeBuffer function.
[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 function was successful. |
|
The dwFlags parameter contains a value that is not valid. |
|
The hProvider parameter is not valid. |
|
One or more parameters are not valid. |
|
A memory allocation failure occurred. |
Remarks
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 |