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 method | FFI symbol | purpose |
|---|---|---|
RngPlugin::create | cfmp_rng_create | construct a new instance |
RngPlugin::reseed | cfmp_rng_reseed | reseed from entropy |
RngPlugin::add_entropy | cfmp_rng_add_entropy | add entropy |
RngPlugin::generate | cfmp_rng_generate | generate random bytes |
Drop | cfmp_rng_destroy | reclaim the boxed state |
Traitsยง
- RngPlugin
- Trait implemented by RNG plugins.