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

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

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<R> Signer<R> for KeyPair<R> where
    R: KeyRole
[src]

Loading content...