[−][src]Struct pgp::composed::signed_key::secret::SignedSecretKey
Represents a secret signed PGP key.
Fields
primary_key: SecretKey
details: SignedKeyDetails
public_subkeys: Vec<SignedPublicSubKey>
secret_subkeys: Vec<SignedSecretSubKey>
Methods
impl SignedSecretKey
[src]
pub fn new(
primary_key: SecretKey,
details: SignedKeyDetails,
public_subkeys: Vec<SignedPublicSubKey>,
secret_subkeys: Vec<SignedSecretSubKey>
) -> Self
[src]
primary_key: SecretKey,
details: SignedKeyDetails,
public_subkeys: Vec<SignedPublicSubKey>,
secret_subkeys: Vec<SignedSecretSubKey>
) -> Self
pub fn verify(&self) -> Result<()>
[src]
pub fn to_armored_writer(
&self,
writer: &mut impl Write,
headers: Option<&BTreeMap<String, String>>
) -> Result<()>
[src]
&self,
writer: &mut impl Write,
headers: Option<&BTreeMap<String, String>>
) -> Result<()>
pub fn to_armored_bytes(
&self,
headers: Option<&BTreeMap<String, String>>
) -> Result<Vec<u8>>
[src]
&self,
headers: Option<&BTreeMap<String, String>>
) -> Result<Vec<u8>>
pub fn to_armored_string(
&self,
headers: Option<&BTreeMap<String, String>>
) -> Result<String>
[src]
&self,
headers: Option<&BTreeMap<String, String>>
) -> Result<String>
Trait Implementations
impl Deserializable for SignedSecretKey
[src]
fn from_packets<'a>(
packets: impl Iterator<Item = Packet> + 'a
) -> Box<dyn Iterator<Item = Result<Self>> + 'a>
[src]
packets: impl Iterator<Item = Packet> + 'a
) -> Box<dyn Iterator<Item = Result<Self>> + 'a>
Parse a transferable key from packets. Ref: https://tools.ietf.org/html/rfc4880.html#section-11.1
fn from_bytes(bytes: impl Read) -> Result<Self>
[src]
fn from_string(input: &str) -> Result<(Self, BTreeMap<String, String>)>
[src]
fn from_string_many<'a>(
input: &'a str
) -> Result<(Box<dyn Iterator<Item = Result<Self>> + 'a>, BTreeMap<String, String>)>
[src]
input: &'a str
) -> Result<(Box<dyn Iterator<Item = Result<Self>> + 'a>, BTreeMap<String, String>)>
fn from_armor_single<R: Read + Seek>(
input: R
) -> Result<(Self, BTreeMap<String, String>)>
[src]
input: R
) -> Result<(Self, BTreeMap<String, String>)>
fn from_armor_many<'a, R: Read + Seek + 'a>(
input: R
) -> Result<(Box<dyn Iterator<Item = Result<Self>> + 'a>, BTreeMap<String, String>)>
[src]
input: R
) -> Result<(Box<dyn Iterator<Item = Result<Self>> + 'a>, BTreeMap<String, String>)>
fn from_bytes_many<'a>(
bytes: impl Read + 'a
) -> Box<dyn Iterator<Item = Result<Self>> + 'a>
[src]
bytes: impl Read + 'a
) -> Box<dyn Iterator<Item = Result<Self>> + 'a>
impl Serialize for SignedSecretKey
[src]
fn to_writer<W: Write>(&self, writer: &mut W) -> Result<()>
[src]
fn to_bytes(&self) -> Result<Vec<u8>>
[src]
impl KeyTrait for SignedSecretKey
[src]
fn fingerprint(&self) -> Vec<u8>
[src]
Returns the fingerprint of the associated primary key.
fn key_id(&self) -> KeyId
[src]
Returns the Key ID of the associated primary key.
fn algorithm(&self) -> PublicKeyAlgorithm
[src]
fn is_signing_key(&self) -> bool
[src]
fn is_encryption_key(&self) -> bool
[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 SecretKeyTrait for SignedSecretKey
[src]
type PublicKey = PublicKey
fn unlock<F, G>(&self, pw: F, work: G) -> Result<()> where
F: FnOnce() -> String,
G: FnOnce(&SecretKeyRepr) -> Result<()>,
[src]
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,
[src]
&self,
key_pw: F,
hash: HashAlgorithm,
data: &[u8]
) -> Result<Vec<Mpi>> where
F: FnOnce() -> String,
fn public_key(&self) -> Self::PublicKey
[src]
impl Clone for SignedSecretKey
[src]
fn clone(&self) -> SignedSecretKey
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Eq for SignedSecretKey
[src]
impl PartialEq<SignedSecretKey> for SignedSecretKey
[src]
fn eq(&self, other: &SignedSecretKey) -> bool
[src]
fn ne(&self, other: &SignedSecretKey) -> bool
[src]
impl Debug for SignedSecretKey
[src]
impl StructuralPartialEq for SignedSecretKey
[src]
impl StructuralEq for SignedSecretKey
[src]
Auto Trait Implementations
impl Send for SignedSecretKey
impl Sync for SignedSecretKey
impl Unpin for SignedSecretKey
impl UnwindSafe for SignedSecretKey
impl RefUnwindSafe for SignedSecretKey
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,