Type Alias mongocrypt_sys::mongocrypt_crypto_fn

source ·
pub type mongocrypt_crypto_fn = Option<unsafe extern "C" fn(ctx: *mut c_void, key: *mut mongocrypt_binary_t, iv: *mut mongocrypt_binary_t, in_: *mut mongocrypt_binary_t, out: *mut mongocrypt_binary_t, bytes_written: *mut u32, status: *mut mongocrypt_status_t) -> bool>;
Expand description

An crypto AES-256-CBC encrypt or decrypt function.

Note, @p in is already padded. Encrypt with padding disabled. @param[in] ctx An optional context object that may have been set when hooks were enabled. @param[in] key An encryption key (32 bytes for AES_256). @param[in] iv An initialization vector (16 bytes for AES_256); @param[in] in The input. @param[out] out A preallocated byte array for the output. See @ref mongocrypt_binary_data. @param[out] bytes_written Set this to the number of bytes written to @p out. @param[out] status An optional status to pass error messages. See @ref mongocrypt_status_set. @returns A boolean indicating success. If returning false, set @p status with a message indiciating the error using @ref mongocrypt_status_set.

Aliased Type§

enum mongocrypt_crypto_fn {
    None,
    Some(unsafe extern "C" fn(_: *mut c_void, _: *mut _mongocrypt_binary_t, _: *mut _mongocrypt_binary_t, _: *mut _mongocrypt_binary_t, _: *mut _mongocrypt_binary_t, _: *mut u32, _: *mut _mongocrypt_status_t) -> bool),
}

Variants§

§1.0.0

None

No value.

§1.0.0

Some(unsafe extern "C" fn(_: *mut c_void, _: *mut _mongocrypt_binary_t, _: *mut _mongocrypt_binary_t, _: *mut _mongocrypt_binary_t, _: *mut _mongocrypt_binary_t, _: *mut u32, _: *mut _mongocrypt_status_t) -> bool)

Some value of type T.