[][src]Trait sequoia_openpgp::crypto::Decryptor

pub trait Decryptor {
    fn public(&self) -> &Key<PublicParts, UnspecifiedRole>;
fn decrypt(
        &mut self,
        ciphertext: &Ciphertext,
        plaintext_len: Option<usize>
    ) -> Result<SessionKey>; }

Decrypts a message.

This is a low-level mechanism to decrypt an arbitrary OpenPGP ciphertext. Using this trait allows Sequoia to perform all operations involving decryption 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 decrypt(
    &mut self,
    ciphertext: &Ciphertext,
    plaintext_len: Option<usize>
) -> Result<SessionKey>

Decrypts ciphertext, returning the plain session key.

Loading content...

Implementors

impl Decryptor for KeyPair[src]

fn decrypt(
    &mut self,
    ciphertext: &Ciphertext,
    plaintext_len: Option<usize>
) -> Result<SessionKey>
[src]

Creates a signature over the digest produced by hash_algo.

Loading content...