---
name: "mongoc_client_encryption_opts_set_keyvault_client"
section: "3"
platform: "linux"
package: "libmongoc-doc"
version: "1.30.4-1+deb13u3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/mongoc_client_encryption_opts_set_keyvault_client"
---

# mongoc\_client\_encryption\_opts\_set\_keyvault\_client(3)

## SYNOPSIS

```
void
mongoc_client_encryption_opts_set_keyvault_client (
   mongoc_client_encryption_opts_t *opts,
   mongoc_client_t *keyvault_client);
```

Set the *mongoc\_client\_t* to use during key creation and key lookup for encryption and decryption. This may be either a single-threaded or multi-threaded client (i.e. a client obtained from a *mongoc\_client\_pool\_t*).

## PARAMETERS

- •

  **opts**: A *mongoc\_client\_encryption\_opts\_t*.

- •

  **client**: A *mongoc\_client\_t* to use for key lookup and creation. This **client** MUST outlive any *mongoc\_client\_encryption\_t* configured to use it with *mongoc\_client\_encryption\_new()*.

**SEE ALSO:**

```
mongoc_client_encryption_new()
```

```
In-Use Encryption
```

## AUTHOR

MongoDB, Inc

## COPYRIGHT

2009-present, MongoDB, Inc.
