Struct pkcs8::AlgorithmIdentifier [−][src]
pub struct AlgorithmIdentifier<'a> {
pub oid: ObjectIdentifier,
pub parameters: Option<Any<'a>>,
}
Expand description
X.509 AlgorithmIdentifier
as defined in RFC 5280 Section 4.1.1.2.
AlgorithmIdentifier ::= SEQUENCE {
algorithm OBJECT IDENTIFIER,
parameters ANY DEFINED BY algorithm OPTIONAL }
Fields
oid: ObjectIdentifier
Algorithm OID, i.e. the algorithm
field in the AlgorithmIdentifier
ASN.1 schema.
parameters: Option<Any<'a>>
Algorithm parameters
.
Implementations
pub fn assert_algorithm_oid(
&self,
expected_oid: ObjectIdentifier
) -> Result<ObjectIdentifier, Error>
pub fn assert_algorithm_oid(
&self,
expected_oid: ObjectIdentifier
) -> Result<ObjectIdentifier, Error>
Assert the algorithm
OID is an expected value.
pub fn assert_parameters_oid(
&self,
expected_oid: ObjectIdentifier
) -> Result<ObjectIdentifier, Error>
pub fn assert_parameters_oid(
&self,
expected_oid: ObjectIdentifier
) -> Result<ObjectIdentifier, Error>
Assert parameters
is an OID and has the expected value.
pub fn assert_oids(
&self,
algorithm: ObjectIdentifier,
parameters: ObjectIdentifier
) -> Result<(), Error>
pub fn assert_oids(
&self,
algorithm: ObjectIdentifier,
parameters: ObjectIdentifier
) -> Result<(), Error>
Assert the values of the algorithm
and parameters
OIDs.
Get the parameters
field as an Any
.
Returns an error if parameters
are None
.
Get the parameters
field as an ObjectIdentifier
.
Returns an error if it is absent or not an OID.
Trait Implementations
Performs the conversion.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Performs the conversion.
Auto Trait Implementations
impl<'a> RefUnwindSafe for AlgorithmIdentifier<'a>
impl<'a> Send for AlgorithmIdentifier<'a>
impl<'a> Sync for AlgorithmIdentifier<'a>
impl<'a> Unpin for AlgorithmIdentifier<'a>
impl<'a> UnwindSafe for AlgorithmIdentifier<'a>
Blanket Implementations
Mutably borrows from an owned value. Read more
Is the provided Tag
decodable as a variant of this CHOICE
?
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