Struct pgp::composed::signed_key::secret::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
sourceimpl SignedSecretSubKey
impl SignedSecretSubKey
pub fn new(key: SecretSubkey, signatures: Vec<Signature>) -> Self
pub fn verify(&self, key: &impl PublicKeyTrait) -> Result<()>
Trait Implementations
sourceimpl Clone for SignedSecretSubKey
impl Clone for SignedSecretSubKey
sourcefn clone(&self) -> SignedSecretSubKey
fn clone(&self) -> SignedSecretSubKey
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 SignedSecretSubKey
impl Debug for SignedSecretSubKey
sourceimpl KeyTrait for SignedSecretSubKey
impl KeyTrait for SignedSecretSubKey
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<SignedSecretSubKey> for SignedSecretSubKey
impl PartialEq<SignedSecretSubKey> for SignedSecretSubKey
sourcefn 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 ==
. Read more
sourcefn ne(&self, other: &SignedSecretSubKey) -> bool
fn ne(&self, other: &SignedSecretSubKey) -> bool
This method tests for !=
.
sourceimpl PublicKeyTrait for SignedSecretSubKey
impl PublicKeyTrait for SignedSecretSubKey
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 SecretKeyTrait for SignedSecretSubKey
impl SecretKeyTrait for SignedSecretSubKey
type PublicKey = PublicSubkey
fn unlock<F, G>(&self, pw: F, work: G) -> Result<()> where
F: FnOnce() -> String,
G: FnOnce(&SecretKeyRepr) -> Result<()>,
fn create_signature<F>(
&self,
key_pw: F,
hash: HashAlgorithm,
data: &[u8]
) -> Result<Vec<Mpi>> where
F: FnOnce() -> String,
fn public_key(&self) -> Self::PublicKey
sourceimpl Serialize for SignedSecretSubKey
impl Serialize for SignedSecretSubKey
impl Eq for SignedSecretSubKey
impl StructuralEq for SignedSecretSubKey
impl StructuralPartialEq for SignedSecretSubKey
Auto Trait Implementations
impl RefUnwindSafe for SignedSecretSubKey
impl Send for SignedSecretSubKey
impl Sync for SignedSecretSubKey
impl Unpin for SignedSecretSubKey
impl UnwindSafe for SignedSecretSubKey
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