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

# RSAENH\_CPGetUserKey(3w)

## NAME

**RSAENH\_CPGetUserKey** (RSAENH.@)

## SYNOPSIS

BOOL RSAENH\_CPGetUserKey\
  (\
   HCRYPTPROV *hProv*,\
   DWORD      *dwKeySpec*,\
   HCRYPTKEY\* *phUserKey*\
  )

## DESCRIPTION

Returns a handle to the user's private key-exchange- or signature-key.

## PARAMS

*hProv* **\[In\]**  The key container from which a user key is requested.

*dwKeySpec* **\[In\]**  **AT\_KEYEXCHANGE** or **AT\_SIGNATURE**.

*phUserKey* **\[Out\]**  Handle to the requested key or **INVALID\_HANDLE\_VALUE** in case of failure.

## RETURNS

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

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

## NOTE

A newly created key container does not contain private user key. Create them with CPGenKey.

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