Trait pgp::types::PublicKeyTrait[][src]

pub trait PublicKeyTrait: KeyTrait {
    fn verify_signature(
        &self,
        hash: HashAlgorithm,
        data: &[u8],
        sig: &[Mpi]
    ) -> Result<()>;
fn encrypt<R: CryptoRng + Rng>(
        &self,
        rng: &mut R,
        plain: &[u8]
    ) -> Result<Vec<Mpi>>;
fn to_writer_old(&self, writer: &mut impl Write) -> Result<()>; }

Required methods

Verify a signed message. Data will be hashed using hash, before verifying.

Encrypt the given plain for this key.

This is the data used for hashing in a signature. Only uses the public portion of the key.

Implementations on Foreign Types

Implementors