Function mongocrypt_sys::mongocrypt_ctx_setopt_algorithm

source ·
pub unsafe extern "C" fn mongocrypt_ctx_setopt_algorithm(
    ctx: *mut mongocrypt_ctx_t,
    algorithm: *const c_char,
    len: c_int,
) -> bool
Expand description

Set the algorithm used for encryption to either deterministic or random encryption. This value should only be set when using explicit encryption.

If -1 is passed in for “len”, then “algorithm” is assumed to be a null-terminated string.

Valid values for algorithm are: “AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic” “AEAD_AES_256_CBC_HMAC_SHA_512-Random”

@param[in] ctx The @ref mongocrypt_ctx_t object. @param[in] algorithm A string specifying the algorithm to use for encryption. @param[in] len The length of the algorithm string. @pre @p ctx has not been initialized. @returns A boolean indicating success. If false, an error status is set. Retrieve it with @ref mongocrypt_ctx_status