Function mongocrypt_sys::mongocrypt_ctx_decrypt_init

source ·
pub unsafe extern "C" fn mongocrypt_ctx_decrypt_init(
    ctx: *mut mongocrypt_ctx_t,
    doc: *mut mongocrypt_binary_t,
) -> bool
Expand description

Initialize a context for decryption.

This method expects the passed-in BSON to be of the form: { “v” : BSON value to encrypt }

@param[in] ctx The @ref mongocrypt_ctx_t object. @param[in] doc The document to be decrypted. The viewed data is copied. It is valid to destroy @p doc 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