Skip to main content

plugin_interface

Attribute Macro plugin_interface 

Source
#[plugin_interface]
Expand description

Attribute macro that emits the cfmp_<iface>_* FFI entry-point symbols for the wire protocol named by name = "...".

Supported interfaces (all at version 0): hash, cipher, aead, kdf, rng, signature, kem, keyfmt. Each dispatches through the corresponding trait in confium_api::plugin.

Place this attribute on an impl Trait for Type block. Example for the hash interface:

#[plugin_interface(name = "hash", version = 0)]
impl HashPlugin for MyHash {
    // ... methods ...
}

The cipher interface advertises under the wire name symmetric (matching the loader-side CipherKind); all other interfaces use the same name for both the attribute and the wire protocol.