---
name: "mongoc_client_encryption_encrypt_opts_set_contention_factor"
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_contention_factor"
---

# mongoc\_client\_encryption\_encrypt\_opts\_set\_contention\_factor(3)

## SYNOPSIS

```
void
mongoc_client_encryption_encrypt_opts_set_contention_factor (
    mongoc_client_encryption_encrypt_opts_t *opts, int64_t contention_factor);
```

Added in version 1.22.0.

Sets a contention factor for explicit encryption. Only applies when the algorithm set by *mongoc\_client\_encryption\_encrypt\_opts\_set\_algorithm()* is "Indexed" or "Range". It is an error to set the contention factor when algorithm is not "Indexed" or "Range". If contention factor is not supplied, it defaults to a value of 0.

## PARAMETERS

- •

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

- •

  **contention\_factor**: A non-negative contention factor.

## AUTHOR

MongoDB, Inc

## COPYRIGHT

2009-present, MongoDB, Inc.
