MONGOC_CLIENT_ENCRYPTION_ENCRYPT(3) | libmongoc | MONGOC_CLIENT_ENCRYPTION_ENCRYPT(3) |
NAME¶
mongoc_client_encryption_encrypt - mongoc_client_encryption_encrypt()
SYNOPSIS¶
bool mongoc_client_encryption_encrypt (
mongoc_client_encryption_t *client_encryption,
const bson_value_t *value,
mongoc_client_encryption_encrypt_opts_t *opts,
bson_value_t *ciphertext,
bson_error_t *error);
Performs explicit encryption.
ciphertext is always initialized (even on failure). Caller must call bson_value_destroy() to free.
PARAMETERS¶
- client_encryption: A mongoc_client_encryption_t
- value: The value to encrypt.
- opts: A mongoc_client_encryption_encrypt_opts_t.
- ciphertext: A bson_value_t for the resulting ciphertext (a BSON binary with subtype 6).
- error: A bson_error_t set on failure.
RETURNS¶
Returns true if successful. Returns false and sets error otherwise.
SEE ALSO¶
- mongoc_client_encryption_encrypt_opts_t
- mongoc_client_enable_auto_encryption()
- mongoc_client_encryption_decrypt()
AUTHOR¶
MongoDB, Inc
COPYRIGHT¶
2017-present, MongoDB, Inc
June 4, 2021 | 1.17.6 |