Skip to main content

PrivateKey

Trait PrivateKey 

Source
pub trait PrivateKey {
    // Required methods
    fn sign(&self, msg: &[u8]) -> Result<Signature>;
    fn public(&self) -> &PublicKey;
}
Expand description

A structure containing information about a private key.

Required Methods§

Source

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

Sign a message.

Source

fn public(&self) -> &PublicKey

Return the public component of the key.

Implementors§