Struct pgp::composed::signed_key::public::SignedPublicSubKey
source · [−]pub struct SignedPublicSubKey {
pub key: PublicSubkey,
pub signatures: Vec<Signature>,
}
Expand description
Represents a Public PGP SubKey.
Fields
key: PublicSubkey
signatures: Vec<Signature>
Implementations
sourceimpl SignedPublicSubKey
impl SignedPublicSubKey
pub fn new(key: PublicSubkey, signatures: Vec<Signature>) -> Self
pub fn verify(&self, key: &impl PublicKeyTrait) -> Result<()>
pub fn as_unsigned(&self) -> PublicSubkey
Trait Implementations
sourceimpl Clone for SignedPublicSubKey
impl Clone for SignedPublicSubKey
sourcefn clone(&self) -> SignedPublicSubKey
fn clone(&self) -> SignedPublicSubKey
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for SignedPublicSubKey
impl Debug for SignedPublicSubKey
sourceimpl KeyTrait for SignedPublicSubKey
impl KeyTrait for SignedPublicSubKey
sourcefn fingerprint(&self) -> Vec<u8>
fn fingerprint(&self) -> Vec<u8>
Returns the fingerprint of the key.
fn algorithm(&self) -> PublicKeyAlgorithm
fn is_signing_key(&self) -> bool
fn is_encryption_key(&self) -> bool
sourceimpl PartialEq<SignedPublicSubKey> for SignedPublicSubKey
impl PartialEq<SignedPublicSubKey> for SignedPublicSubKey
sourcefn eq(&self, other: &SignedPublicSubKey) -> bool
fn eq(&self, other: &SignedPublicSubKey) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &SignedPublicSubKey) -> bool
fn ne(&self, other: &SignedPublicSubKey) -> bool
This method tests for !=
.
sourceimpl PublicKeyTrait for SignedPublicSubKey
impl PublicKeyTrait for SignedPublicSubKey
sourcefn verify_signature(
&self,
hash: HashAlgorithm,
data: &[u8],
sig: &[Mpi]
) -> Result<()>
fn verify_signature(
&self,
hash: HashAlgorithm,
data: &[u8],
sig: &[Mpi]
) -> Result<()>
Verify a signed message.
Data will be hashed using hash
, before verifying. Read more
sourcefn encrypt<R: Rng + CryptoRng>(
&self,
rng: &mut R,
plain: &[u8]
) -> Result<Vec<Mpi>>
fn encrypt<R: Rng + CryptoRng>(
&self,
rng: &mut R,
plain: &[u8]
) -> Result<Vec<Mpi>>
Encrypt the given plain
for this key.
sourcefn 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.
sourceimpl Serialize for SignedPublicSubKey
impl Serialize for SignedPublicSubKey
impl Eq for SignedPublicSubKey
impl StructuralEq for SignedPublicSubKey
impl StructuralPartialEq for SignedPublicSubKey
Auto Trait Implementations
impl RefUnwindSafe for SignedPublicSubKey
impl Send for SignedPublicSubKey
impl Sync for SignedPublicSubKey
impl Unpin for SignedPublicSubKey
impl UnwindSafe for SignedPublicSubKey
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more