> For the complete documentation index, see [llms.txt](https://www.pinvoke.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.pinvoke.dev/crypt32/cryptunprotectdata.md).

# CryptUnprotectData

```csharp
[DllImport("CRYPT32.dll", ExactSpelling = true, SetLastError = true)]
[DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
public static extern unsafe BOOL CryptUnprotectData(
    CRYPT_INTEGER_BLOB* pDataIn,
    [Optional] PWSTR* ppszDataDescr,
    [Optional] CRYPT_INTEGER_BLOB* pOptionalEntropy,
    [Optional] void* pvReserved,
    [Optional] CRYPTPROTECT_PROMPTSTRUCT* pPromptStruct,
    uint dwFlags,
    CRYPT_INTEGER_BLOB* pDataOut);
```

[CRYPT\_INTEGER\_BLOB](/cryptography/crypt_integer_blob.md)

[CRYPTPROTECT\_PROMPTSTRUCT](/cryptography/cryptprotect_promptstruct.md)

Valid `dwFlags`:

```csharp
public const uint CRYPTPROTECT_UI_FORBIDDEN = 1U;
public const uint CRYPTPROTECT_VERIFY_PROTECTION = 64U;
```
