pub unsafe extern "C" fn mongocrypt_ctx_setopt_key_material(
ctx: *mut mongocrypt_ctx_t,
key_material: *mut mongocrypt_binary_t,
) -> bool
Expand description
Set the keyMaterial to use for encrypting data.
Pass the binary encoding of a BSON document like the following:
{ “keyMaterial” : (BSON BINARY value) }
@param[in] ctx The @ref mongocrypt_ctx_t object. @param[in] key_material The data encryption key to use. The viewed data is copied. It is valid to destroy @p key_material with @ref mongocrypt_binary_destroy immediately after. @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