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

# RSAENH\_CPEncrypt(3w)

## NAME

**RSAENH\_CPEncrypt** (RSAENH.@)

## SYNOPSIS

BOOL RSAENH\_CPEncrypt\
  (\
   HCRYPTPROV *hProv*,\
   HCRYPTKEY  *hKey*,\
   HCRYPTHASH *hHash*,\
   BOOL       *Final*,\
   DWORD      *dwFlags*,\
   BYTE\*      *pbData*,\
   DWORD\*     *pdwDataLen*,\
   DWORD      *dwBufLen*\
  )

## DESCRIPTION

Encrypt data.

## PARAMS

*hProv* **\[In\]**  The key container *hKey* and *hHash* belong to.

*hKey* **\[In\]**  The key used to encrypt the data.

*hHash* **\[In\]**  An optional hash object for parallel hashing. See notes.

*Final* **\[In\]**  Indicates if this is the last block of data to encrypt.

*dwFlags* **\[In\]**  Currently no flags defined. Must be zero.

*pbData* **\[In/Out\]**  Pointer to the data to encrypt. Encrypted data will also be stored there.

*pdwDataLen* **\[In/Out\]**  I: Length of data to encrypt, O: Length of encrypted data.

*dwBufLen* **\[In\]**  Size of the buffer at *pbData*.

## RETURNS

**Success:** **TRUE**.

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

## NOTES

If a hash object handle is provided in *hHash*, it will be updated with the plaintext. This is useful for message signatures.

This function uses the standard **WINAPI** protocol for querying data of dynamic length.

## IMPLEMENTATION

Not declared in a Wine header. The function is either undocumented, or missing from Wine.

Implemented in **"dlls/rsaenh/rsaenh.c"**.

Debug channel **"crypt"**.
