NCryptStreamOpenToUnprotectEx function (ncryptprotect.h)
Opens a stream object that can be used to decrypt large amounts of data to the same protection descriptor used for encryption.Call NCryptStreamUpdate to perform the decryption. To decrypt smaller messages such as keys and passwords, call NCryptUnprotectSecret.
Syntax
SECURITY_STATUS NCryptStreamOpenToUnprotectEx(
[in] NCRYPT_PROTECT_STREAM_INFO_EX *pStreamInfo,
DWORD dwFlags,
[in, optional] HWND hWnd,
[out] NCRYPT_STREAM_HANDLE *phStream
);
Parameters
[in] pStreamInfo
A pointer to NCRYPT_PROTECT_STREAM_INFO_EX.
dwFlags
Only the NCRYPT_SILENT_FLAG is supported.
[in, optional] hWnd
A window handle to be used as the parent of any user interface that is displayed.
[out] phStream
Receives a pointer to a stream handle.
Return value
Returns a status code that indicates the success or failure of the function. Possible return codes include, but are not limited to:
- ERROR_SUCCESS
- NTE_INVALID_PARAMETER
- NTE_BAD_FLAGS
- NTE_BAD_DATA
- NTE_NO_MEMORY
- NTE_NOT_FOUND
- NTE_NOT_SUPPORTED
- NTE_INVALID_HANDLE
- NTE_BAD_KEY
- NTE_BAD_PROVIDER
- NTE_BAD_TYPE
- NTE_DECRYPTION_FAILURE
Requirements
Requirement | Value |
---|---|
Target Platform | Windows |
Header | ncryptprotect.h |
Library | Ncrypt.lib |
DLL | Ncrypt.dll |