Struct pgp::packet::Signature [−][src]
pub struct Signature {
pub config: SignatureConfig,
pub signed_hash_value: [u8; 2],
pub signature: Vec<Mpi>,
// some fields omitted
}
Expand description
Signature Packet https://tools.ietf.org/html/rfc4880.html#section-5.2
Fields
config: SignatureConfig
signed_hash_value: [u8; 2]
signature: Vec<Mpi>
Implementations
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
pub fn from_config(
config: SignatureConfig,
signed_hash_value: [u8; 2],
signature: Vec<Mpi>
) -> Self
Returns what kind of signature this is.
Verify this signature.
pub fn verify_certificate(
&self,
key: &impl PublicKeyTrait,
tag: Tag,
id: &impl Serialize
) -> Result<()>
pub fn verify_certificate(
&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<()>
pub fn verify_key_binding(
&self,
signing_key: &impl PublicKeyTrait,
key: &impl PublicKeyTrait
) -> Result<()>
Verifies a key binding.
Verifies a direct key signature or a revocation.
Returns if the signature is a certificate or not.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Signature
impl UnwindSafe for Signature
Blanket Implementations
Mutably borrows from an owned value. Read more
type Output = T
type Output = T
Should always be Self