Struct sequoia_openpgp::packet::signature::Signature4[][src]

pub struct Signature4 { /* fields omitted */ }
Expand description

Holds a v4 Signature packet.

This holds a version 4 Signature packet. Normally, you won’t directly work with this data structure, but with the Signature enum, which is version agnostic. An exception is when you need to do version-specific operations. But currently, there aren’t any version-specific methods.

Implementations

Hashing-related functionality.

Hashes this signature for use in a Third-Party Confirmation signature.

Creates a new signature packet.

If you want to sign something, consider using the SignatureBuilder interface.

Gets the public key algorithm.

Gets the hash prefix.

Gets the signature packet’s MPIs.

Gets the computed hash value.

This is set by the PacketParser when parsing the message.

Gets the signature level.

A level of 0 indicates that the signature is directly over the data, a level of 1 means that the signature is a notarization over all level 0 signatures and the data, and so on.

Returns whether or not this signature should be exported.

This checks whether the Exportable Certification subpacket is absent or present and 1, and that the signature does not include any sensitive Revocation Key (designated revokers) subpackets.

Methods from Deref<Target = SignatureFields>

Hashes this standalone signature.

Hashes this timestamp signature.

Hashes this direct key signature over the specified primary key, and the primary key.

Hashes this subkey binding over the specified primary key and subkey, the primary key, and the subkey.

Hashes this primary key binding over the specified primary key and subkey, the primary key, and the subkey.

Hashes this user ID binding over the specified primary key and user ID, the primary key, and the userid.

Hashes this user attribute binding over the specified primary key and user attribute, the primary key, and the user attribute.

Gets the version.

Gets the signature type.

This function is called typ and not type, because type is a reserved word.

Gets the hash algorithm.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

The resulting type after dereferencing.

Dereferences the value.

Mutably dereferences the value.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Updates the given hash with this object.

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

Writes a serialized version of the specified Signature packet to o.

Errors

Returns Error::InvalidArgument if either the hashed-area or the unhashed-area exceeds the size limit of 2^16.

Exports a serialized version of the object to o. Read more

Computes the maximal length of the serialized representation. Read more

Serializes into the given buffer. Read more

Exports into the given buffer. Read more

Exports to a vector. Read more

Serializes the packet to a vector.

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

Restrict a value to a certain interval. Read more

This method tests for self and other values to be equal, and is used by ==.

This method compares the serialized version of the two packets. Thus, the computed values are ignored (level, computed_digest).

Note: because this function also compares the unhashed subpacket area, it is possible for a malicious party to take valid signatures, add subpackets to the unhashed area, yielding valid but distinct signatures. If you want to ignore the unhashed area, you should instead use the Signature::normalized_eq method.

This method tests for !=.

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

The type returned in the event of a conversion error.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.