Enum sec1::EcParameters
source · pub enum EcParameters {
NamedCurve(ObjectIdentifier),
}
Available on crate feature
der
only.Expand description
Elliptic curve parameters as described in RFC5480 Section 2.1.1:
ECParameters ::= CHOICE {
namedCurve OBJECT IDENTIFIER
-- implicitCurve NULL
-- specifiedCurve SpecifiedECDomain
}
-- implicitCurve and specifiedCurve MUST NOT be used in PKIX.
-- Details for SpecifiedECDomain can be found in [X9.62].
-- Any future additions to this CHOICE should be coordinated
-- with ANSI X9.
Variants§
NamedCurve(ObjectIdentifier)
Elliptic curve named by a particular OID.
namedCurve identifies all the required values for a particular set of elliptic curve domain parameters to be represented by an object identifier.
Implementations§
source§impl EcParameters
impl EcParameters
sourcepub fn named_curve(self) -> Option<ObjectIdentifier>
pub fn named_curve(self) -> Option<ObjectIdentifier>
Obtain the namedCurve
OID.
Trait Implementations§
source§impl Clone for EcParameters
impl Clone for EcParameters
source§fn clone(&self) -> EcParameters
fn clone(&self) -> EcParameters
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for EcParameters
impl Debug for EcParameters
source§impl<'a> DecodeValue<'a> for EcParameters
impl<'a> DecodeValue<'a> for EcParameters
source§impl EncodeValue for EcParameters
impl EncodeValue for EcParameters
source§impl<'a> From<&'a EcParameters> for AnyRef<'a>
impl<'a> From<&'a EcParameters> for AnyRef<'a>
source§fn from(params: &'a EcParameters) -> AnyRef<'a>
fn from(params: &'a EcParameters) -> AnyRef<'a>
Converts to this type from the input type.
source§impl From<ObjectIdentifier> for EcParameters
impl From<ObjectIdentifier> for EcParameters
source§fn from(oid: ObjectIdentifier) -> EcParameters
fn from(oid: ObjectIdentifier) -> EcParameters
Converts to this type from the input type.
source§impl PartialEq<EcParameters> for EcParameters
impl PartialEq<EcParameters> for EcParameters
source§fn eq(&self, other: &EcParameters) -> bool
fn eq(&self, other: &EcParameters) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for EcParameters
impl Eq for EcParameters
impl StructuralEq for EcParameters
impl StructuralPartialEq for EcParameters
Auto Trait Implementations§
impl RefUnwindSafe for EcParameters
impl Send for EcParameters
impl Sync for EcParameters
impl Unpin for EcParameters
impl UnwindSafe for EcParameters
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<'a, T> Decode<'a> for Twhere
T: DecodeValue<'a> + FixedTag,
impl<'a, T> Decode<'a> for Twhere T: DecodeValue<'a> + FixedTag,
source§impl<T> Encode for Twhere
T: EncodeValue + Tagged,
impl<T> Encode for Twhere T: EncodeValue + Tagged,
source§fn encoded_len(&self) -> Result<Length, Error>
fn encoded_len(&self) -> Result<Length, Error>
Compute the length of this value in bytes when encoded as ASN.1 DER.
source§fn encode(&self, writer: &mut impl Writer) -> Result<(), Error>
fn encode(&self, writer: &mut impl Writer) -> Result<(), Error>
Encode this value as ASN.1 DER using the provided Writer
.
source§fn encode_to_slice<'a>(&self, buf: &'a mut [u8]) -> Result<&'a [u8], Error>
fn encode_to_slice<'a>(&self, buf: &'a mut [u8]) -> Result<&'a [u8], Error>
Encode this value to the provided byte slice, returning a sub-slice
containing the encoded message.