Skip to main content

PluginSignatureVerifier

Trait PluginSignatureVerifier 

Source
pub trait PluginSignatureVerifier {
    // Required method
    fn verify(
        &self,
        manifest: PluginManifest,
        bytes: &[u8],
        key_fingerprint: &str,
    ) -> bool;
}
Expand description

Host-provided cryptographic verifier for official plugin signatures. 由宿主提供的官方插件签名密码学验证器。

NichLink deliberately does not implement a signature scheme. The host can connect its existing Ed25519, platform keystore, or isolated process verifier without making the registry depend on that implementation. NichLink 刻意不实现具体签名算法。宿主可以接入现有的 Ed25519、平台密钥库或 隔离进程验证器,而不让注册机依赖这些实现。

Required Methods§

Source

fn verify( &self, manifest: PluginManifest, bytes: &[u8], key_fingerprint: &str, ) -> bool

Return whether the host accepts this signature for the given bytes and key. 宿主是否接受该签名用于给定字节与密钥。

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<F> PluginSignatureVerifier for F
where F: Fn(PluginManifest, &[u8], &str) -> bool,