Enum sec1::EcParameters
source · [−]pub enum EcParameters {
NamedCurve(ObjectIdentifier),
}
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
sourceimpl EcParameters
impl EcParameters
sourcepub fn named_curve(self) -> Option<ObjectIdentifier>
pub fn named_curve(self) -> Option<ObjectIdentifier>
Obtain the namedCurve
OID.
Trait Implementations
sourceimpl Clone for EcParameters
impl Clone for EcParameters
sourcefn clone(&self) -> EcParameters
fn clone(&self) -> EcParameters
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for EcParameters
impl Debug for EcParameters
sourceimpl<'a> DecodeValue<'a> for EcParameters
impl<'a> DecodeValue<'a> for EcParameters
sourceimpl EncodeValue for EcParameters
impl EncodeValue for EcParameters
sourceimpl<'a> From<&'a EcParameters> for AnyRef<'a>
impl<'a> From<&'a EcParameters> for AnyRef<'a>
sourcefn from(params: &'a EcParameters) -> AnyRef<'a>
fn from(params: &'a EcParameters) -> AnyRef<'a>
Converts to this type from the input type.
sourceimpl From<ObjectIdentifier> for EcParameters
impl From<ObjectIdentifier> for EcParameters
sourcefn from(oid: ObjectIdentifier) -> EcParameters
fn from(oid: ObjectIdentifier) -> EcParameters
Converts to this type from the input type.
sourceimpl PartialEq<EcParameters> for EcParameters
impl PartialEq<EcParameters> for EcParameters
sourcefn 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 ==
. Read more
sourcefn ne(&self, other: &EcParameters) -> bool
fn ne(&self, other: &EcParameters) -> bool
This method tests for !=
.
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<'a, T> Choice<'a> for T where
T: Decode<'a> + FixedTag,
impl<'a, T> Choice<'a> for T where
T: Decode<'a> + FixedTag,
sourcefn can_decode(tag: Tag) -> bool
fn can_decode(tag: Tag) -> bool
Is the provided Tag
decodable as a variant of this CHOICE
?
sourceimpl<'a, T> Decode<'a> for T where
T: DecodeValue<'a> + FixedTag,
impl<'a, T> Decode<'a> for T where
T: DecodeValue<'a> + FixedTag,
sourceimpl<T> Encode for T where
T: EncodeValue + Tagged,
impl<T> Encode for T where
T: EncodeValue + Tagged,
sourcefn 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.
sourcefn encode(&self, writer: &mut dyn Writer) -> Result<(), Error>
fn encode(&self, writer: &mut dyn Writer) -> Result<(), Error>
Encode this value as ASN.1 DER using the provided Encoder
.
sourcefn encode_to_slice(&self, buf: &'a mut [u8]) -> Result<&'a [u8], Error>
fn encode_to_slice(&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. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more