Function mongocrypt_sys::mongocrypt_ctx_encrypt_init

source ยท
pub unsafe extern "C" fn mongocrypt_ctx_encrypt_init(
    ctx: *mut mongocrypt_ctx_t,
    db: *const c_char,
    db_len: i32,
    cmd: *mut mongocrypt_binary_t,
) -> bool
Expand description

Initialize a context for encryption.

@param[in] ctx The @ref mongocrypt_ctx_t object. @param[in] db The database name. @param[in] db_len The byte length of @p db. Pass -1 to determine the string length with strlen (must be NULL terminated). @param[in] cmd The BSON command to be encrypted. The viewed data is copied. It is valid to destroy @p cmd with @ref mongocrypt_binary_destroy immediately after. @returns A boolean indicating success. If false, an error status is set. Retrieve it with @ref mongocrypt_ctx_status