Struct pgp::composed::signed_key::SignedSecretSubKey
source · pub struct SignedSecretSubKey {
pub key: SecretSubkey,
pub signatures: Vec<Signature>,
}
Expand description
Represents a composed secret PGP SubKey.
Fields§
§key: SecretSubkey
§signatures: Vec<Signature>
Implementations§
source§impl SignedSecretSubKey
impl SignedSecretSubKey
pub fn new(key: SecretSubkey, signatures: Vec<Signature>) -> Self
pub fn verify(&self, key: &impl PublicKeyTrait) -> Result<()>
Trait Implementations§
source§impl Clone for SignedSecretSubKey
impl Clone for SignedSecretSubKey
source§fn clone(&self) -> SignedSecretSubKey
fn clone(&self) -> SignedSecretSubKey
Returns a copy 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 SignedSecretSubKey
impl Debug for SignedSecretSubKey
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 KeyTrait for SignedSecretSubKey
impl KeyTrait for SignedSecretSubKey
source§impl PartialEq for SignedSecretSubKey
impl PartialEq for SignedSecretSubKey
source§fn eq(&self, other: &SignedSecretSubKey) -> bool
fn eq(&self, other: &SignedSecretSubKey) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PublicKeyTrait for SignedSecretSubKey
impl PublicKeyTrait for SignedSecretSubKey
source§fn 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.source§impl SecretKeyTrait for SignedSecretSubKey
impl SecretKeyTrait for SignedSecretSubKey
type PublicKey = PublicSubkey
fn unlock<F, G>(&self, pw: F, work: G) -> Result<()>
fn create_signature<F>( &self, key_pw: F, hash: HashAlgorithm, data: &[u8] ) -> Result<Vec<Mpi>>
fn public_key(&self) -> Self::PublicKey
fn public_params(&self) -> &PublicParams
source§fn hash_alg(&self) -> HashAlgorithm
fn hash_alg(&self) -> HashAlgorithm
The suggested hash algorithm to calculate the signature hash digest with, when using this
key as a signer
source§impl Serialize for SignedSecretSubKey
impl Serialize for SignedSecretSubKey
impl Eq for SignedSecretSubKey
impl StructuralPartialEq for SignedSecretSubKey
Auto Trait Implementations§
impl Freeze for SignedSecretSubKey
impl RefUnwindSafe for SignedSecretSubKey
impl Send for SignedSecretSubKey
impl Sync for SignedSecretSubKey
impl Unpin for SignedSecretSubKey
impl UnwindSafe for SignedSecretSubKey
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