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§
source§impl Clone for KeyAlgorithm
impl Clone for KeyAlgorithm
source§fn clone(&self) -> KeyAlgorithm
fn clone(&self) -> KeyAlgorithm
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 KeyAlgorithm
impl Debug for KeyAlgorithm
source§impl Display for KeyAlgorithm
impl Display for KeyAlgorithm
source§impl From<&InMemorySigningKeyPair> for KeyAlgorithm
impl From<&InMemorySigningKeyPair> for KeyAlgorithm
source§fn from(key: &InMemorySigningKeyPair) -> Self
fn from(key: &InMemorySigningKeyPair) -> Self
Converts to this type from the input type.
source§impl From<KeyAlgorithm> for AlgorithmIdentifier
impl From<KeyAlgorithm> for AlgorithmIdentifier
source§fn from(alg: KeyAlgorithm) -> Self
fn from(alg: KeyAlgorithm) -> Self
Converts to this type from the input type.
source§impl From<KeyAlgorithm> for ObjectIdentifier
impl From<KeyAlgorithm> for ObjectIdentifier
source§fn from(alg: KeyAlgorithm) -> Self
fn from(alg: KeyAlgorithm) -> Self
Converts to this type from the input type.
source§impl From<KeyAlgorithm> for Oid
impl From<KeyAlgorithm> for Oid
source§fn from(alg: KeyAlgorithm) -> Self
fn from(alg: KeyAlgorithm) -> Self
Converts to this type from the input type.
source§impl PartialEq<KeyAlgorithm> for KeyAlgorithm
impl PartialEq<KeyAlgorithm> for KeyAlgorithm
source§fn 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 ==
.source§impl 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.