pub struct SignedPublicSubKey {
pub key: PublicSubkey,
pub signatures: Vec<Signature>,
}
Expand description
Represents a Public PGP SubKey.
Fields§
§key: PublicSubkey
§signatures: Vec<Signature>
Implementations§
Source§impl 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§
Source§impl Clone for SignedPublicSubKey
impl Clone for SignedPublicSubKey
Source§fn clone(&self) -> SignedPublicSubKey
fn clone(&self) -> SignedPublicSubKey
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for SignedPublicSubKey
impl Debug for SignedPublicSubKey
Source§impl From<SignedSecretSubKey> for SignedPublicSubKey
impl From<SignedSecretSubKey> for SignedPublicSubKey
Source§fn from(value: SignedSecretSubKey) -> Self
fn from(value: SignedSecretSubKey) -> Self
Converts to this type from the input type.
Source§impl PartialEq for SignedPublicSubKey
impl PartialEq for SignedPublicSubKey
Source§impl PublicKeyTrait for SignedPublicSubKey
impl PublicKeyTrait for SignedPublicSubKey
Source§fn fingerprint(&self) -> Fingerprint
fn fingerprint(&self) -> Fingerprint
Returns the fingerprint of the key.
Source§fn verify_signature(
&self,
hash: HashAlgorithm,
data: &[u8],
sig: &SignatureBytes,
) -> Result<()>
fn verify_signature( &self, hash: HashAlgorithm, data: &[u8], sig: &SignatureBytes, ) -> Result<()>
Verify a signed message.
Data will be hashed using
hash
, before verifying.Source§fn encrypt<R: Rng + CryptoRng>(
&self,
rng: R,
plain: &[u8],
typ: EskType,
) -> Result<PkeskBytes>
fn encrypt<R: Rng + CryptoRng>( &self, rng: R, plain: &[u8], typ: EskType, ) -> Result<PkeskBytes>
Encrypt the given
plain
for this key.Source§fn serialize_for_hashing(&self, writer: &mut impl Write) -> Result<()>
fn serialize_for_hashing(&self, writer: &mut impl Write) -> Result<()>
This is the data used for hashing in a signature. Only uses the public portion of the key.
fn public_params(&self) -> &PublicParams
fn version(&self) -> KeyVersion
fn algorithm(&self) -> PublicKeyAlgorithm
fn created_at(&self) -> &DateTime<Utc>
fn expiration(&self) -> Option<u16>
fn is_signing_key(&self) -> bool
fn is_encryption_key(&self) -> bool
Source§impl Serialize for SignedPublicSubKey
impl Serialize for SignedPublicSubKey
impl Eq for SignedPublicSubKey
impl StructuralPartialEq for SignedPublicSubKey
Auto Trait Implementations§
impl Freeze for SignedPublicSubKey
impl RefUnwindSafe for SignedPublicSubKey
impl Send for SignedPublicSubKey
impl Sync for SignedPublicSubKey
impl Unpin for SignedPublicSubKey
impl UnwindSafe for SignedPublicSubKey
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more