Trait pgp::native::types::PublicKeyTrait
source · pub trait PublicKeyTrait: KeyTrait {
// Required methods
fn verify_signature(
&self,
hash: HashAlgorithm,
data: &[u8],
sig: &[Mpi]
) -> Result<(), Error>;
fn encrypt<R>(
&self,
rng: &mut R,
plain: &[u8]
) -> Result<Vec<Mpi, Global>, Error>
where R: CryptoRng + Rng;
fn to_writer_old(&self, writer: &mut impl Write) -> Result<(), Error>;
}
Required Methods§
sourcefn verify_signature(
&self,
hash: HashAlgorithm,
data: &[u8],
sig: &[Mpi]
) -> Result<(), Error>
fn verify_signature( &self, hash: HashAlgorithm, data: &[u8], sig: &[Mpi] ) -> Result<(), Error>
Verify a signed message.
Data will be hashed using hash
, before verifying.