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

# RSAENH\_CPGenKey(3w)

## NAME

**RSAENH\_CPGenKey** (RSAENH.@)

## SYNOPSIS

BOOL RSAENH\_CPGenKey\
  (\
   HCRYPTPROV *hProv*,\
   ALG\_ID     *Algid*,\
   DWORD      *dwFlags*,\
   HCRYPTKEY\* *phKey*\
  )

## DESCRIPTION

Generate a key in the key container.

## PARAMS

*hProv* **\[In\]**  Key container for which a key is to be generated.

*Algid* **\[In\]**  Crypto algorithm identifier for the key to be generated.

*dwFlags* **\[In\]**  Upper **16** bits: Binary length of key. Lower **16** bits: Flags. See Notes.

*phKey* **\[Out\]**  Handle to the generated key.

## RETURNS

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

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

## FIXME

Flags currently not considered.

## NOTES

Private key-exchange- and signature-keys can be generated with *Algid* **AT\_KEYEXCHANGE** and **AT\_SIGNATURE** values.

## 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"**.
