[−][src]Struct pgp::composed::signed_key::public::SignedPublicKey
Represents a Public PGP key, which is signed and either received or ready to be transferred.
Fields
primary_key: PublicKey
details: SignedKeyDetails
public_subkeys: Vec<SignedPublicSubKey>
Methods
impl SignedPublicKey
[src]
pub fn new(
primary_key: PublicKey,
details: SignedKeyDetails,
public_subkeys: Vec<SignedPublicSubKey>
) -> Self
[src]
primary_key: PublicKey,
details: SignedKeyDetails,
public_subkeys: Vec<SignedPublicSubKey>
) -> Self
pub fn expires_at(&self) -> Option<DateTime<Utc>>
[src]
Get the public key expiration as a date.
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>
pub fn as_unsigned(&self) -> PublicKey
[src]
Trait Implementations
impl Clone for SignedPublicKey
[src]
fn clone(&self) -> SignedPublicKey
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for SignedPublicKey
[src]
impl Deserializable for SignedPublicKey
[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 Eq for SignedPublicKey
[src]
impl KeyTrait for SignedPublicKey
[src]
fn fingerprint(&self) -> Vec<u8>
[src]
fn key_id(&self) -> KeyId
[src]
fn algorithm(&self) -> PublicKeyAlgorithm
[src]
fn is_signing_key(&self) -> bool
[src]
fn is_encryption_key(&self) -> bool
[src]
impl PartialEq<SignedPublicKey> for SignedPublicKey
[src]
fn eq(&self, other: &SignedPublicKey) -> bool
[src]
fn ne(&self, other: &SignedPublicKey) -> bool
[src]
impl PublicKeyTrait for SignedPublicKey
[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 Serialize for SignedPublicKey
[src]
fn to_writer<W: Write>(&self, writer: &mut W) -> Result<()>
[src]
fn to_bytes(&self) -> Result<Vec<u8>>
[src]
impl StructuralEq for SignedPublicKey
[src]
impl StructuralPartialEq for SignedPublicKey
[src]
Auto Trait Implementations
impl RefUnwindSafe for SignedPublicKey
impl Send for SignedPublicKey
impl Sync for SignedPublicKey
impl Unpin for SignedPublicKey
impl UnwindSafe for SignedPublicKey
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
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> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
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, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,