Skip to main content

SignVerify

Trait SignVerify 

Source
pub trait SignVerify {
    // Provided methods
    fn sign(secret_key: &[u8], msg: &[u8]) -> Result<(Signature, RecoveryId)> { ... }
    fn verify(pub_key: &[u8], sign: &Signature, msg: &[u8]) -> Result<bool> { ... }
}

Provided Methods§

Source

fn sign(secret_key: &[u8], msg: &[u8]) -> Result<(Signature, RecoveryId)>

数据签名

Source

fn verify(pub_key: &[u8], sign: &Signature, msg: &[u8]) -> Result<bool>

验证签名

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§