Struct ethers::core::k256::elliptic_curve::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
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
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
.
Compare self to key
and return true
if they are equal.
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more