---
name: "mongoc_client_encryption_new"
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_new"
---

# mongoc\_client\_encryption\_new(3)

## SYNOPSIS

```
mongoc_client_encryption_t *
mongoc_client_encryption_new (mongoc_client_encryption_opts_t *opts,
                              bson_error_t *error);
```

Create a new *mongoc\_client\_encryption\_t*.

## PARAMETERS

- •

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

- •

  **error**: A *bson\_error\_t*.

## RETURNS

A new *mongoc\_client\_encryption\_t* that must be freed with *mongoc\_client\_encryption\_destroy()* if successful. Returns **NULL** and sets **error** otherwise.

**SEE ALSO:**

```
mongoc_client_encryption_t
```

```
mongoc_client_encryption_opts_t
```

## AUTHOR

MongoDB, Inc

## COPYRIGHT

2009-present, MongoDB, Inc.
