---
name: "mongoc_client_encryption_encrypt_opts_set_algorithm"
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_encrypt_opts_set_algorithm"
---

# mongoc\_client\_encryption\_encrypt\_opts\_set\_algorithm(3)

## SYNOPSIS

```
void
mongoc_client_encryption_encrypt_opts_set_algorithm (
   mongoc_client_encryption_encrypt_opts_t *opts, const char *algorithm);
#define MONGOC_AEAD_AES_256_CBC_HMAC_SHA_512_RANDOM "AEAD_AES_256_CBC_HMAC_SHA_512-Random"
#define MONGOC_AEAD_AES_256_CBC_HMAC_SHA_512_DETERMINISTIC "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic"
#define MONGOC_ENCRYPT_ALGORITHM_INDEXED "Indexed"
#define MONGOC_ENCRYPT_ALGORITHM_UNINDEXED "Unindexed"
#define MONGOC_ENCRYPT_ALGORITHM_RANGE "Range"
```

Identifies the algorithm to use for encryption. Valid values of **algorithm** are:

**"AEAD\_AES\_256\_CBC\_HMAC\_SHA\_512-Random"**

for randomized encryption. Specific to the *Client-Side Field Level Encryption* feature.

**"AEAD\_AES\_256\_CBC\_HMAC\_SHA\_512-Deterministic"**

for deterministic (queryable) encryption. Specific to the *Client-Side Field Level Encryption* feature.

**"Indexed"**

for indexed encryption. Specific to the *Queryable Encryption* feature.

**"Unindexed"**

for unindexed encryption. Specific to the *Queryable Encryption* feature.

**"Range"**

for range encryption. Specific to the *Queryable Encryption* feature.

## PARAMETERS

- •

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

- •

  **algorithm**: A **char \*** identifying the algorithm.

## AUTHOR

MongoDB, Inc

## COPYRIGHT

2009-present, MongoDB, Inc.
