Skip to main content

Module rng

Module rng 

Source
Expand description

RngPlugin trait โ€” the Rust-side counterpart of the RNG v0 wire protocol.

Plugin authors implement this trait on their RNG state type, then apply #[plugin_interface(name = "rng", version = 0)] to the impl block.

Method โ†’ symbol mapping (see crates/confium-core/src/ffi/rng.rs for the loader-side wire types):

trait methodFFI symbolpurpose
RngPlugin::createcfmp_rng_createconstruct a new instance
RngPlugin::reseedcfmp_rng_reseedreseed from entropy
RngPlugin::add_entropycfmp_rng_add_entropyadd entropy
RngPlugin::generatecfmp_rng_generategenerate random bytes
Dropcfmp_rng_destroyreclaim the boxed state

Traitsยง

RngPlugin
Trait implemented by RNG plugins.