logo
pub enum Version {
    V1,
    V2,
}
Expand description

Version identifier for PKCS#8 documents.

(RFC 5958 designates 0 and 1 as the only valid versions for PKCS#8 documents)

Variants

V1

Denotes PKCS#8 v1: no public key field.

V2

Denotes PKCS#8 v2: OneAsymmetricKey with public key field.

Implementations

Is this version expected to have a public key?

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

Compute the length of this value in bytes when encoded as ASN.1 DER.

Encode this value as ASN.1 DER using the provided Encoder.

Encode this value to the provided byte slice, returning a sub-slice containing the encoded message. Read more

Encode this message as ASN.1 DER, appending it to the provided byte vector. Read more

Serialize this message as a byte vector.

Converts to this type from the input type.

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

This method tests for !=.

ASN.1 tag

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.

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

Is the provided Tag decodable as a variant of this CHOICE?

Attempt to decode this message using the provided decoder.

Parse Self from the provided DER-encoded byte slice.

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

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

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.