Enum x509_certificate::algorithm::KeyAlgorithm
source · [−]pub enum KeyAlgorithm {
Rsa,
Ecdsa(EcdsaCurve),
Ed25519,
}
Expand description
Cryptographic algorithm used by a private key.
Instances can be converted to/from the underlying ASN.1 type and OIDs.
Variants
Rsa
RSA
Corresponds to OID 1.2.840.113549.1.1.1.
Ecdsa(EcdsaCurve)
Corresponds to OID 1.2.840.10045.2.1
The inner OID tracks the curve / parameter in use.
Ed25519
Corresponds to OID 1.3.101.110
Trait Implementations
sourceimpl Clone for KeyAlgorithm
impl Clone for KeyAlgorithm
sourcefn clone(&self) -> KeyAlgorithm
fn clone(&self) -> KeyAlgorithm
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 KeyAlgorithm
impl Debug for KeyAlgorithm
sourceimpl Display for KeyAlgorithm
impl Display for KeyAlgorithm
sourceimpl From<&'_ InMemorySigningKeyPair> for KeyAlgorithm
impl From<&'_ InMemorySigningKeyPair> for KeyAlgorithm
sourcefn from(key: &InMemorySigningKeyPair) -> Self
fn from(key: &InMemorySigningKeyPair) -> Self
Converts to this type from the input type.
sourceimpl From<KeyAlgorithm> for Oid
impl From<KeyAlgorithm> for Oid
sourcefn from(alg: KeyAlgorithm) -> Self
fn from(alg: KeyAlgorithm) -> Self
Converts to this type from the input type.
sourceimpl From<KeyAlgorithm> for ObjectIdentifier
impl From<KeyAlgorithm> for ObjectIdentifier
sourcefn from(alg: KeyAlgorithm) -> Self
fn from(alg: KeyAlgorithm) -> Self
Converts to this type from the input type.
sourceimpl From<KeyAlgorithm> for AlgorithmIdentifier
impl From<KeyAlgorithm> for AlgorithmIdentifier
sourcefn from(alg: KeyAlgorithm) -> Self
fn from(alg: KeyAlgorithm) -> Self
Converts to this type from the input type.
sourceimpl PartialEq<KeyAlgorithm> for KeyAlgorithm
impl PartialEq<KeyAlgorithm> for KeyAlgorithm
sourcefn eq(&self, other: &KeyAlgorithm) -> bool
fn eq(&self, other: &KeyAlgorithm) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &KeyAlgorithm) -> bool
fn ne(&self, other: &KeyAlgorithm) -> bool
This method tests for !=
.
sourceimpl TryFrom<&'_ AlgorithmIdentifier> for KeyAlgorithm
impl TryFrom<&'_ AlgorithmIdentifier> for KeyAlgorithm
type Error = X509CertificateError
type Error = X509CertificateError
The type returned in the event of a conversion error.
sourcefn try_from(v: &AlgorithmIdentifier) -> Result<Self, Self::Error>
fn try_from(v: &AlgorithmIdentifier) -> Result<Self, Self::Error>
Performs the conversion.
sourceimpl TryFrom<&'_ ObjectIdentifier> for KeyAlgorithm
impl TryFrom<&'_ ObjectIdentifier> for KeyAlgorithm
type Error = X509CertificateError
type Error = X509CertificateError
The type returned in the event of a conversion error.
sourcefn try_from(v: &ObjectIdentifier) -> Result<Self, Self::Error>
fn try_from(v: &ObjectIdentifier) -> Result<Self, Self::Error>
Performs the conversion.
sourceimpl TryFrom<&'_ Oid<Bytes>> for KeyAlgorithm
impl TryFrom<&'_ Oid<Bytes>> for KeyAlgorithm
impl Copy for KeyAlgorithm
impl Eq for KeyAlgorithm
impl StructuralEq for KeyAlgorithm
impl StructuralPartialEq for KeyAlgorithm
Auto Trait Implementations
impl RefUnwindSafe for KeyAlgorithm
impl Send for KeyAlgorithm
impl Sync for KeyAlgorithm
impl Unpin for KeyAlgorithm
impl UnwindSafe for KeyAlgorithm
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<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