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

# CryptCreateHash(3w)

## NAME

**CryptCreateHash** (ADVAPI32.@)

## SYNOPSIS

BOOL CryptCreateHash\
  (\
   HCRYPTPROV  *hProv*,\
   ALG\_ID      *Algid*,\
   HCRYPTKEY   *hKey*,\
   DWORD       *dwFlags*,\
   HCRYPTHASH\* *phHash*\
  )

## DESCRIPTION

Initiates the hashing of a stream of data.

## PARAMS

*hProv* **\[In\]**  Handle of a **CSP**.

*Algid* **\[In\]**  Identifies the hash algorithm to use.

*hKey* **\[In\]**  Key for the hash (if required).

*dwFlags* **\[In\]**  Reserved for future use and must be **NULL**.

*phHash* **\[Out\]**  Address of the future handle to the new hash object.

## RETURNS

**Success:** **TRUE**

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

## NOTES

If the algorithm is a keyed hash, *hKey* is the key.

## IMPLEMENTATION

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

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

Debug channel **"crypt"**.
