[−][src]Trait pgp::types::PublicKeyTrait
Required methods
fn verify_signature(
&self,
hash: HashAlgorithm,
data: &[u8],
sig: &[Mpi]
) -> Result<()>
&self,
hash: HashAlgorithm,
data: &[u8],
sig: &[Mpi]
) -> Result<()>
Verify a signed message.
Data will be hashed using hash
, before verifying.
fn encrypt<R: CryptoRng + Rng>(
&self,
rng: &mut R,
plain: &[u8]
) -> Result<Vec<Mpi>>
&self,
rng: &mut R,
plain: &[u8]
) -> Result<Vec<Mpi>>
Encrypt the given plain
for this key.
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.
Implementations on Foreign Types
impl<'a, T: PublicKeyTrait> PublicKeyTrait for &'a T
[src]
fn verify_signature(
&self,
hash: HashAlgorithm,
data: &[u8],
sig: &[Mpi]
) -> Result<()>
[src]
&self,
hash: HashAlgorithm,
data: &[u8],
sig: &[Mpi]
) -> Result<()>
fn encrypt<R: CryptoRng + Rng>(
&self,
rng: &mut R,
plain: &[u8]
) -> Result<Vec<Mpi>>
[src]
&self,
rng: &mut R,
plain: &[u8]
) -> Result<Vec<Mpi>>
fn to_writer_old(&self, writer: &mut impl Write) -> Result<()>
[src]
Implementors
impl PublicKeyTrait for pgp::composed::key::PublicKey
[src]
fn verify_signature(
&self,
hash: HashAlgorithm,
data: &[u8],
sig: &[Mpi]
) -> Result<()>
[src]
&self,
hash: HashAlgorithm,
data: &[u8],
sig: &[Mpi]
) -> Result<()>
fn encrypt<R: Rng + CryptoRng>(
&self,
rng: &mut R,
plain: &[u8]
) -> Result<Vec<Mpi>>
[src]
&self,
rng: &mut R,
plain: &[u8]
) -> Result<Vec<Mpi>>
fn to_writer_old(&self, writer: &mut impl Write) -> Result<()>
[src]
impl PublicKeyTrait for pgp::composed::key::PublicSubkey
[src]
fn verify_signature(
&self,
hash: HashAlgorithm,
data: &[u8],
sig: &[Mpi]
) -> Result<()>
[src]
&self,
hash: HashAlgorithm,
data: &[u8],
sig: &[Mpi]
) -> Result<()>
fn encrypt<R: Rng + CryptoRng>(
&self,
rng: &mut R,
plain: &[u8]
) -> Result<Vec<Mpi>>
[src]
&self,
rng: &mut R,
plain: &[u8]
) -> Result<Vec<Mpi>>
fn to_writer_old(&self, writer: &mut impl Write) -> Result<()>
[src]
impl PublicKeyTrait for SignedPublicKey
[src]
fn verify_signature(
&self,
hash: HashAlgorithm,
data: &[u8],
sig: &[Mpi]
) -> Result<()>
[src]
&self,
hash: HashAlgorithm,
data: &[u8],
sig: &[Mpi]
) -> Result<()>
fn encrypt<R: Rng + CryptoRng>(
&self,
rng: &mut R,
plain: &[u8]
) -> Result<Vec<Mpi>>
[src]
&self,
rng: &mut R,
plain: &[u8]
) -> Result<Vec<Mpi>>
fn to_writer_old(&self, writer: &mut impl Write) -> Result<()>
[src]
impl PublicKeyTrait for SignedPublicSubKey
[src]
fn verify_signature(
&self,
hash: HashAlgorithm,
data: &[u8],
sig: &[Mpi]
) -> Result<()>
[src]
&self,
hash: HashAlgorithm,
data: &[u8],
sig: &[Mpi]
) -> Result<()>
fn encrypt<R: Rng + CryptoRng>(
&self,
rng: &mut R,
plain: &[u8]
) -> Result<Vec<Mpi>>
[src]
&self,
rng: &mut R,
plain: &[u8]
) -> Result<Vec<Mpi>>
fn to_writer_old(&self, writer: &mut impl Write) -> Result<()>
[src]
impl PublicKeyTrait for SignedSecretKey
[src]
fn verify_signature(
&self,
hash: HashAlgorithm,
data: &[u8],
sig: &[Mpi]
) -> Result<()>
[src]
&self,
hash: HashAlgorithm,
data: &[u8],
sig: &[Mpi]
) -> Result<()>
fn encrypt<R: Rng + CryptoRng>(
&self,
rng: &mut R,
plain: &[u8]
) -> Result<Vec<Mpi>>
[src]
&self,
rng: &mut R,
plain: &[u8]
) -> Result<Vec<Mpi>>
fn to_writer_old(&self, writer: &mut impl Write) -> Result<()>
[src]
impl PublicKeyTrait for SignedSecretSubKey
[src]
fn verify_signature(
&self,
hash: HashAlgorithm,
data: &[u8],
sig: &[Mpi]
) -> Result<()>
[src]
&self,
hash: HashAlgorithm,
data: &[u8],
sig: &[Mpi]
) -> Result<()>
fn encrypt<R: Rng + CryptoRng>(
&self,
rng: &mut R,
plain: &[u8]
) -> Result<Vec<Mpi>>
[src]
&self,
rng: &mut R,
plain: &[u8]
) -> Result<Vec<Mpi>>
fn to_writer_old(&self, writer: &mut impl Write) -> Result<()>
[src]
impl PublicKeyTrait for pgp::packet::PublicKey
[src]
fn verify_signature(
&self,
hash: HashAlgorithm,
hashed: &[u8],
sig: &[Mpi]
) -> Result<()>
[src]
&self,
hash: HashAlgorithm,
hashed: &[u8],
sig: &[Mpi]
) -> Result<()>
fn encrypt<R: CryptoRng + Rng>(
&self,
rng: &mut R,
plain: &[u8]
) -> Result<Vec<Mpi>>
[src]
&self,
rng: &mut R,
plain: &[u8]
) -> Result<Vec<Mpi>>
fn to_writer_old(&self, writer: &mut impl Write) -> Result<()>
[src]
impl PublicKeyTrait for pgp::packet::PublicSubkey
[src]
fn verify_signature(
&self,
hash: HashAlgorithm,
hashed: &[u8],
sig: &[Mpi]
) -> Result<()>
[src]
&self,
hash: HashAlgorithm,
hashed: &[u8],
sig: &[Mpi]
) -> Result<()>
fn encrypt<R: CryptoRng + Rng>(
&self,
rng: &mut R,
plain: &[u8]
) -> Result<Vec<Mpi>>
[src]
&self,
rng: &mut R,
plain: &[u8]
) -> Result<Vec<Mpi>>
fn to_writer_old(&self, writer: &mut impl Write) -> Result<()>
[src]
impl PublicKeyTrait for SecretKey
[src]
fn verify_signature(
&self,
hash: HashAlgorithm,
hashed: &[u8],
sig: &[Mpi]
) -> Result<()>
[src]
&self,
hash: HashAlgorithm,
hashed: &[u8],
sig: &[Mpi]
) -> Result<()>
fn encrypt<R: Rng + CryptoRng>(
&self,
rng: &mut R,
plain: &[u8]
) -> Result<Vec<Mpi>>
[src]
&self,
rng: &mut R,
plain: &[u8]
) -> Result<Vec<Mpi>>