[][src]Trait sequoia_openpgp::crypto::Signer

pub trait Signer {
    fn public(&self) -> &Key;
fn sign(
        &mut self,
        hash_algo: HashAlgorithm,
        digest: &[u8]
    ) -> Result<Signature>; }

Creates a signature.

This is a low-level mechanism to produce an arbitrary OpenPGP signature. Using this trait allows Sequoia to perform all operations involving signing to use a variety of secret key storage mechanisms (e.g. smart cards).

Required methods

fn public(&self) -> &Key

Returns a reference to the public key.

fn sign(&mut self, hash_algo: HashAlgorithm, digest: &[u8]) -> Result<Signature>

Creates a signature over the digest produced by hash_algo.

Loading content...

Implementors

impl Signer for KeyPair[src]

Loading content...