PFNCryptStreamOutputCallback function pointer
The PFNCryptStreamOutputCallback function receives encrypted or decrypted data from tasks started by using the NCryptStreamOpenToProtect or NCryptStreamOpenToUnprotect functions. This callback must be defined by your application using the following syntax.
typedef NTSTATUS ( CALLBACK *PFNCryptStreamOutputCallback)( _In_ void *pvCallbackCtxt, _In_ const BYTE *pbData, SIZE_T cbData, BOOL fFinal );
- pvCallbackCtxt [in]
Pointer to data that you can use to keep track of your application. The data is not modified by the data protection API.
Note You can set a pointer to your context data in the pvCallbackCtxt member of the NCRYPT_PROTECT_STREAM_INFO structure before passing a pointer to that structure in the pStreamInfo parameter of the NCryptStreamOpenToProtect or NCryptStreamOpenToUnprotect functions.
- pbData [in]
Pointer to a block of processed data that can be used by the application.
The size, in bytes, of the processed data pointed to by the pbData parameter.
If this value is TRUE, the current data block is the last to be processed and this is the last time the callback will be called.
If you return any status code other than ERROR_SUCCESS from your implementation of this callback function, the stream encryption or decryption process will fail.
The function was successful.
Set a pointer to this callback function in the pfnStreamOutput member of the NCRYPT_PROTECT_STREAM_INFO structure. Set a pointer to the structure in the pStreamInfo parameter of the NCryptStreamOpenToProtect or NCryptStreamOpenToUnprotect functions.
You can use this callback to further process the encrypted or decrypted data. A common use of the function is to write the data to disk as it is received from the data protection API. The blocks of encrypted or unencrypted data are created by the NCryptStreamUpdate function.
Minimum supported client
|Windows 8 [desktop apps only]|
Minimum supported server
|Windows Server 2012 [desktop apps only]|
- CNG DPAPI Functions
Build date: 11/16/2013