Struct pretty_good::SignaturePacket [] [src]

pub struct SignaturePacket {
    pub sig_type: SignatureType,
    pub pubkey_algo: PublicKeyAlgorithm,
    pub hash_algo: HashAlgorithm,
    pub hashed_subpackets: Vec<Subpacket>,
    pub unhashed_subpackets: Vec<Subpacket>,
    // some fields omitted
}

The contents of a PGP signature packet.

Fields

Methods

impl SignaturePacket
[src]

[src]

Create a new signature with the given parameters. The new signature's creation time will be set to the current system time, and the contents will be empty.

[src]

Retrieve the contents of this signature. For RSA signatures, this is a single multiprecision integer representing m^d mod n; for DSA signatures this is two multiprecision integers representing r and s.

[src]

Set the contents of this signature.

[src]

Retrive the creation time of this signature.

[src]

Set the creation time of this signature.

[src]

Retrieve the key ID of this signature's issuer.

[src]

Set the key ID of this signature's issuer.

[src]

Retrieve the preferred hash algorithms of this signature.

[src]

Set the preferred hash algorithms of this signature. If hashed is true, this subpacket will be added as a hashed subpacket.

[src]

Build a payload suitable for signing.

Note that this payload must be placed in an ASN.1 DigestInfo structure prior to signing, which is outside the scope of this library.

[src]

Retrieve the header for this signature, i.e. everything except the MPI contents of the signature.

[src]

Serialize this signature to bytes.

[src]

Read in a signature from some bytes.

Trait Implementations

impl Clone for SignaturePacket
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for SignaturePacket
[src]

[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations