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

pub trait Signer {
    fn public(&self) -> &Key<PublicParts, UnspecifiedRole>;
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<PublicParts, UnspecifiedRole>

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...

Implementations on Foreign Types

impl Signer for Box<dyn Signer>[src]

Loading content...


impl Signer for KeyPair[src]

Loading content...