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

# CryptSignHashW(3w)

## NAME

**CryptSignHashW** (ADVAPI32.@)

## SYNOPSIS

BOOL CryptSignHashW\
  (\
   HCRYPTHASH *hHash*,\
   DWORD      *dwKeySpec*,\
   LPCWSTR    *sDescription*,\
   DWORD      *dwFlags*,\
   BYTE\*      *pbSignature*,\
   DWORD\*     *pdwSigLen*\
  )

## DESCRIPTION

Signs data.

## PARAMS

*hHash* **\[In\]**  Handle of the hash object to be signed.

*dwKeySpec* **\[In\]**  Private key to use.

*sDescription* **\[In\]**  Should be **NULL**.

*dwFlags* **\[In\]**  CRYPT\_NOHASHOID/X931\_FORMAT.

*pbSignature* **\[Out\]**  Buffer of the signature data.

*pdwSigLen* **\[In/Out\]**  Size of the *pbSignature* buffer.

## RETURNS

**Success:** **TRUE**

**Failure:** **FALSE**.

## NOTES

Because of security flaws *sDescription* should not be used and should thus be **NULL**. It is supported only for compatibility with Microsoft's Cryptographic Providers.

## IMPLEMENTATION

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

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

Debug channel **"crypt"**.
