[][src]Enum sequoia_openpgp::packet::signature::subpacket::SubpacketValue

pub enum SubpacketValue {
    Unknown(Vec<u8>),
    SignatureCreationTime(Timestamp),
    SignatureExpirationTime(Duration),
    ExportableCertification(bool),
    TrustSignature {
        level: u8,
        trust: u8,
    },
    RegularExpression(Vec<u8>),
    Revocable(bool),
    KeyExpirationTime(Duration),
    PreferredSymmetricAlgorithms(Vec<SymmetricAlgorithm>),
    RevocationKey {
        class: u8,
        pk_algo: PublicKeyAlgorithm,
        fp: Fingerprint,
    },
    Issuer(KeyID),
    NotationData(NotationData),
    PreferredHashAlgorithms(Vec<HashAlgorithm>),
    PreferredCompressionAlgorithms(Vec<CompressionAlgorithm>),
    KeyServerPreferences(KeyServerPreferences),
    PreferredKeyServer(Vec<u8>),
    PrimaryUserID(bool),
    PolicyURI(Vec<u8>),
    KeyFlags(KeyFlags),
    SignersUserID(Vec<u8>),
    ReasonForRevocation {
        code: ReasonForRevocation,
        reason: Vec<u8>,
    },
    Features(Features),
    SignatureTarget {
        pk_algo: PublicKeyAlgorithm,
        hash_algo: HashAlgorithm,
        digest: Vec<u8>,
    },
    EmbeddedSignature(Signature),
    IssuerFingerprint(Fingerprint),
    PreferredAEADAlgorithms(Vec<AEADAlgorithm>),
    IntendedRecipient(Fingerprint),
}

Struct holding an arbitrary subpacket.

The value is well structured. See SubpacketTag for a description of these tags.

Variants

Unknown(Vec<u8>)

The subpacket is unknown.

SignatureCreationTime(Timestamp)

4-octet time field

SignatureExpirationTime(Duration)

4-octet time field

ExportableCertification(bool)

1 octet of exportability, 0 for not, 1 for exportable

TrustSignature

1 octet "level" (depth), 1 octet of trust amount

Fields of TrustSignature

level: u8

Trust level, or depth.

Level 0 has the same meaning as an ordinary validity signature. Level 1 means that the signed key is asserted to be a valid trusted introducer, with the 2nd octet of the body specifying the degree of trust. Level 2 means that the signed key is asserted to be trusted to issue level 1 trust signatures, i.e., that it is a "meta introducer".

trust: u8

Trust amount.

This is interpreted such that values less than 120 indicate partial trust and values of 120 or greater indicate complete trust. Implementations SHOULD emit values of 60 for partial trust and 120 for complete trust.

RegularExpression(Vec<u8>)

Null-terminated regular expression

Revocable(bool)

1 octet of revocability, 0 for not, 1 for revocable

KeyExpirationTime(Duration)

4-octet time field.

PreferredSymmetricAlgorithms(Vec<SymmetricAlgorithm>)

Array of one-octet values

RevocationKey

1 octet of class, 1 octet of public-key algorithm ID, 20 octets of fingerprint

Fields of RevocationKey

class: u8

Class octet must have bit 0x80 set. If the bit 0x40 is set, then this means that the revocation information is sensitive. Other bits are for future expansion to other kinds of authorizations.

pk_algo: PublicKeyAlgorithm

XXX: RFC4880 says nothing about this.

fp: Fingerprint

Fingerprint of authorized key.

Issuer(KeyID)

8-octet Key ID

NotationData(NotationData)

The notation has a name and a value, each of which are strings of octets..

PreferredHashAlgorithms(Vec<HashAlgorithm>)

Array of one-octet values

PreferredCompressionAlgorithms(Vec<CompressionAlgorithm>)

Array of one-octet values

KeyServerPreferences(KeyServerPreferences)

N octets of flags

PreferredKeyServer(Vec<u8>)

String (URL)

PrimaryUserID(bool)

1 octet, Boolean

PolicyURI(Vec<u8>)

String (URL)

KeyFlags(KeyFlags)

N octets of flags

SignersUserID(Vec<u8>)

String

ReasonForRevocation

1 octet of revocation code, N octets of reason string

Fields of ReasonForRevocation

code: ReasonForRevocation

Machine-readable reason for revocation.

reason: Vec<u8>

Human-readable reason for revocation.

Features(Features)

N octets of flags

SignatureTarget

1-octet public-key algorithm, 1 octet hash algorithm, N octets hash

Fields of SignatureTarget

pk_algo: PublicKeyAlgorithm

Public-key algorithm of the target signature.

hash_algo: HashAlgorithm

Hash algorithm of the target signature.

digest: Vec<u8>

Hash digest of the target signature.

EmbeddedSignature(Signature)

An embedded signature.

IssuerFingerprint(Fingerprint)

20-octet V4 fingerprint.

PreferredAEADAlgorithms(Vec<AEADAlgorithm>)

Preferred AEAD Algorithms.

IntendedRecipient(Fingerprint)

Intended Recipient Fingerprint [proposed].

Methods

impl SubpacketValue[src]

pub fn len(&self) -> usize[src]

Returns the length of the serialized value.

pub fn tag(&self) -> Result<SubpacketTag>[src]

Returns the subpacket tag for this value.

Trait Implementations

impl Clone for SubpacketValue[src]

impl Debug for SubpacketValue[src]

impl Eq for SubpacketValue[src]

impl Hash for SubpacketValue[src]

impl PartialEq<SubpacketValue> for SubpacketValue[src]

impl Serialize for SubpacketValue[src]

impl SerializeInto for SubpacketValue[src]

impl StructuralEq for SubpacketValue[src]

impl StructuralPartialEq for SubpacketValue[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,