Skip to main content

SignatureVerifier

Trait SignatureVerifier 

Source
pub trait SignatureVerifier: Send + Sync {
    // Required methods
    fn sign(&self, message: &[u8]) -> Vec<u8> ;
    fn verify(&self, message: &[u8], signature: &[u8]) -> bool;
}
Expand description

签名验证器 trait:提供消息签名与验证接口

Required Methods§

Source

fn sign(&self, message: &[u8]) -> Vec<u8>

对消息生成签名

Source

fn verify(&self, message: &[u8], signature: &[u8]) -> bool

验证消息签名(常量时间比较)

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§