Skip to main content

PublicKeyExt

Trait PublicKeyExt 

Source
trait PublicKeyExt {
    // Required methods
    fn as_bytes(&self) -> &[u8] ⓘ;
    fn verify(&self, msg: &[u8], signature: &[u8]) -> Result<()>;
}
Expand description

An extension trait, adding essential methods to all PublicKey types.

Required Methods§

Source

fn as_bytes(&self) -> &[u8] ⓘ

Source

fn verify(&self, msg: &[u8], signature: &[u8]) -> Result<()>

Verify a signature on a message with this public key.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§