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

# CryptUnprotectData(3w)

## NAME

**CryptUnprotectData** (CRYPT32.@)

## SYNOPSIS

BOOL CryptUnprotectData\
  (\
   DATA\_BLOB\*                 *pDataIn*,\
   LPWSTR\*                    *ppszDataDescr*,\
   DATA\_BLOB\*                 *pOptionalEntropy*,\
   PVOID                      *pvReserved*,\
   CRYPTPROTECT\_PROMPTSTRUCT\* *pPromptStruct*,\
   DWORD                      *dwFlags*,\
   DATA\_BLOB\*                 *pDataOut*\
  )

## DESCRIPTION

Generate Plain data and Description from given Cipher and Entropy data.

## PARAMS

*pDataIn* **\[In\]**  Cipher data to be decoded.

*ppszDataDescr* **\[Out\]**  Optional Unicode string describing the Plain data.

*pOptionalEntropy* **\[In\]**  Optional entropy data to adjust cipher, can be **NULL**.

*pvReserved* **\[In\]**  Reserved, must be **NULL**.

*pPromptStruct* **\[In\]**  Structure describing if/how to prompt during decoding.

*dwFlags* **\[In\]**  Flags describing options to the decoding.

*pDataOut* **\[Out\]**  Resulting Plain data, from calls to CryptProtectData.

## RETURNS

**TRUE** If a Plain was generated. **FALSE** If something failed and no Plain is available.

## FIXME

The **TRUE** Windows(tm) encryption and keying mechanisms are unknown.

*dwFlags* and *pPromptStruct* are currently ignored.

## NOTES

Memory allocated in *pDataOut* and non-NULL *ppszDataDescr* must be freed with LocalFree.

## IMPLEMENTATION

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

Implemented in **"dlls/crypt32/protectdata.c"**.

Debug channel **"crypt"**.
