BOOL CRYPTFUNC CryptDecrypt(
HCRYPTKEY hKey,
HCRYPTHASH hHash,
BOOL Final,
DWORD dwFlags,
BYTE *pbData,
DWORD *pdwDataLen
);
Parameters
hKey
[in] A handle to the key to use for the decryption. An application obtains this handle by using either the CryptGenKey or CryptImportKey function.
This key specifies the decryption algorithm that is used.
hHash
[in] A handle to a hash object. This parameter is only used if a hash of the data is to be computed. See the "Remarks" section for more information.
If no hash is to be done, this parameter must be zero.
Final
[in] The Boolean value that specifies whether this is the last section in a series being decrypted. This will be TRUE if this is the last or only block. If it is not, then it will be FALSE. See the "Remarks" section for more information.
dwFlags
[in] The flag values. This parameter is reserved for future use and should always be zero.
pbData
[in/out] The buffer holding the data to be decrypted. Once that decryption has been performed, the plaintext is placed back in this same buffer.
The number of encrypted bytes in this buffer is specified by pdwDataLen.
pdwDataLen
[in/out] The address of the data length. Before calling this function, the caller should set this parameter to the number of bytes to be decrypted. Upon return, this address will contain the number of bytes of plaintext generated.
When a block cipher is used, this data length must be a multiple of the block size, unless this is the final section of data to be decrypted and the Final flag is TRUE.
Partager