[−][src]Struct pgp::packet::Signature
Signature Packet https://tools.ietf.org/html/rfc4880.html#section-5.2
Fields
config: SignatureConfig
signed_hash_value: [u8; 2]
signature: Vec<Mpi>
Methods
impl Signature
[src]
pub fn new(
packet_version: Version,
version: SignatureVersion,
typ: SignatureType,
pub_alg: PublicKeyAlgorithm,
hash_alg: HashAlgorithm,
signed_hash_value: [u8; 2],
signature: Vec<Mpi>,
hashed_subpackets: Vec<Subpacket>,
unhashed_subpackets: Vec<Subpacket>
) -> Self
[src]
packet_version: Version,
version: SignatureVersion,
typ: SignatureType,
pub_alg: PublicKeyAlgorithm,
hash_alg: HashAlgorithm,
signed_hash_value: [u8; 2],
signature: Vec<Mpi>,
hashed_subpackets: Vec<Subpacket>,
unhashed_subpackets: Vec<Subpacket>
) -> Self
pub fn from_config(
config: SignatureConfig,
signed_hash_value: [u8; 2],
signature: Vec<Mpi>
) -> Self
[src]
config: SignatureConfig,
signed_hash_value: [u8; 2],
signature: Vec<Mpi>
) -> Self
pub fn typ(&self) -> SignatureType
[src]
Returns what kind of signature this is.
pub fn verify(&self, key: &impl PublicKeyTrait, data: &[u8]) -> Result<()>
[src]
Verify this signature.
pub fn verify_certificate(
&self,
key: &impl PublicKeyTrait,
tag: Tag,
id: &impl Serialize
) -> Result<()>
[src]
&self,
key: &impl PublicKeyTrait,
tag: Tag,
id: &impl Serialize
) -> Result<()>
Verifies a certificate siganture type.
pub fn verify_key_binding(
&self,
signing_key: &impl PublicKeyTrait,
key: &impl PublicKeyTrait
) -> Result<()>
[src]
&self,
signing_key: &impl PublicKeyTrait,
key: &impl PublicKeyTrait
) -> Result<()>
Verifies a key binding.
pub fn verify_key(&self, key: &impl PublicKeyTrait) -> Result<()>
[src]
Verifies a direct key signature or a revocation.
pub fn is_certificate(&self) -> bool
[src]
Returns if the signature is a certificate or not.
pub fn key_expiration_time(&self) -> Option<&DateTime<Utc>>
[src]
pub fn signature_expiration_time(&self) -> Option<&DateTime<Utc>>
[src]
pub fn created(&self) -> Option<&DateTime<Utc>>
[src]
pub fn issuer(&self) -> Option<&KeyId>
[src]
pub fn preferred_symmetric_algs(&self) -> &[SymmetricKeyAlgorithm]
[src]
pub fn preferred_hash_algs(&self) -> &[HashAlgorithm]
[src]
pub fn preferred_compression_algs(&self) -> &[CompressionAlgorithm]
[src]
pub fn key_server_prefs(&self) -> &[u8]
[src]
pub fn key_flags(&self) -> KeyFlags
[src]
pub fn features(&self) -> &[u8]
[src]
pub fn revocation_reason_code(&self) -> Option<&RevocationCode>
[src]
pub fn revocation_reason_string(&self) -> Option<&str>
[src]
pub fn is_primary(&self) -> bool
[src]
pub fn is_revocable(&self) -> bool
[src]
pub fn embedded_signature(&self) -> Option<&Signature>
[src]
pub fn preferred_key_server(&self) -> Option<&str>
[src]
pub fn notations(&self) -> Vec<&Notation>
[src]
pub fn revocation_key(&self) -> Option<&RevocationKey>
[src]
pub fn signers_userid(&self) -> Option<&str>
[src]
pub fn policy_uri(&self) -> Option<&str>
[src]
pub fn trust_signature(&self) -> Option<(u8, u8)>
[src]
pub fn regular_expression(&self) -> Option<&str>
[src]
pub fn exportable_certification(&self) -> bool
[src]
Trait Implementations
impl Deserialize for Signature
[src]
fn from_slice(packet_version: Version, input: &[u8]) -> Result<Self>
[src]
Parses a Signature
packet from the given slice.
impl PacketTrait for Signature
[src]
impl Serialize for Signature
[src]
fn to_writer<W: Write>(&self, writer: &mut W) -> Result<()>
[src]
fn to_bytes(&self) -> Result<Vec<u8>>
[src]
impl From<Signature> for Packet
[src]
impl Clone for Signature
[src]
impl Eq for Signature
[src]
impl PartialEq<Signature> for Signature
[src]
impl Debug for Signature
[src]
impl StructuralPartialEq for Signature
[src]
impl StructuralEq for Signature
[src]
impl TryFrom<Packet> for Signature
[src]
Auto Trait Implementations
impl Send for Signature
impl Sync for Signature
impl Unpin for Signature
impl UnwindSafe for Signature
impl RefUnwindSafe for Signature
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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 = !
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<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,
fn vzip(self) -> V
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,