Function mongocrypt_sys::mongocrypt_ctx_setopt_key_id
source ยท pub unsafe extern "C" fn mongocrypt_ctx_setopt_key_id(
ctx: *mut mongocrypt_ctx_t,
key_id: *mut mongocrypt_binary_t,
) -> bool
Expand description
Set the key id to use for explicit encryption.
It is an error to set both this and the key alt name.
@param[in] ctx The @ref mongocrypt_ctx_t object. @param[in] key_id The binary corresponding to the _id (a UUID) of the data key to use from the key vault collection. Note, the UUID must be encoded with RFC-4122 byte order. The viewed data is copied. It is valid to destroy @p key_id 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