Type Alias mongocrypt_sys::mongocrypt_hmac_fn
source · pub type mongocrypt_hmac_fn = Option<unsafe extern "C" fn(ctx: *mut c_void, key: *mut mongocrypt_binary_t, in_: *mut mongocrypt_binary_t, out: *mut mongocrypt_binary_t, status: *mut mongocrypt_status_t) -> bool>;
Expand description
A crypto signature or HMAC function.
Currently used in callbacks for HMAC SHA-512, HMAC SHA-256, and RSA SHA-256 signature.
@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 HMAC_SHA512). @param[in] in The input. @param[out] out A preallocated byte array for the output. See @ref mongocrypt_binary_data. @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_hmac_fn {
None,
Some(unsafe extern "C" fn(_: *mut c_void, _: *mut _mongocrypt_binary_t, _: *mut _mongocrypt_binary_t, _: *mut _mongocrypt_binary_t, _: *mut _mongocrypt_status_t) -> bool),
}
Variants§
None
No value.
Some(unsafe extern "C" fn(_: *mut c_void, _: *mut _mongocrypt_binary_t, _: *mut _mongocrypt_binary_t, _: *mut _mongocrypt_binary_t, _: *mut _mongocrypt_status_t) -> bool)
Some value of type T
.