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.
fn to_writer_old(&self, writer: &mut impl Write) -> Result<()>
fn to_writer_old(&self, writer: &mut impl Write) -> Result<()>
This is the data used for hashing in a signature. Only uses the public portion of the key.