---
name: "CryptDecrypt"
section: "3w"
platform: "linux"
package: "libwine-dev"
version: "1.4.1-4"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/CryptDecrypt"
---

# CryptDecrypt(3w)

## NAME

**CryptDecrypt** (ADVAPI32.@)

## SYNOPSIS

BOOL CryptDecrypt\
  (\
   HCRYPTKEY  *hKey*,\
   HCRYPTHASH *hHash*,\
   BOOL       *Final*,\
   DWORD      *dwFlags*,\
   BYTE\*      *pbData*,\
   DWORD\*     *pdwDataLen*\
  )

## DESCRIPTION

Decrypts data encrypted by CryptEncrypt.

## PARAMS

*hKey* **\[In\]**  Handle to the decryption key.

*hHash* **\[In\]**  Handle to a hash object.

*Final* **\[In\]**  **TRUE** if this is the last section to be decrypted.

*dwFlags* **\[In\]**  Reserved for future use. Can be **CRYPT\_OAEP**.

*pbData* **\[In/Out\]**  Buffer that holds the encrypted data. Holds decrypted data on return.

*pdwDataLen* **\[In/Out\]**  Length of *pbData* before and after the call.

## RETURNS

**Success:** **TRUE**

**Failure:** **FALSE**

## IMPLEMENTATION

Declared in **"wincrypt.h"**.

Implemented in **"dlls/advapi32/crypt.c"**.

Debug channel **"crypt"**.
