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 for KeyAlgorithm
impl PartialEq for KeyAlgorithm
Source§impl TryFrom<&AlgorithmIdentifier> for KeyAlgorithm
impl TryFrom<&AlgorithmIdentifier> for KeyAlgorithm
Source§type Error = X509CertificateError
type Error = X509CertificateError
The type returned in the event of a conversion error.
Source§impl TryFrom<&ObjectIdentifier> for KeyAlgorithm
impl TryFrom<&ObjectIdentifier> for KeyAlgorithm
Source§type Error = X509CertificateError
type Error = X509CertificateError
The type returned in the event of a conversion error.
Source§impl TryFrom<&Oid> for KeyAlgorithm
impl TryFrom<&Oid> for KeyAlgorithm
impl Copy for KeyAlgorithm
impl Eq for KeyAlgorithm
impl StructuralPartialEq for KeyAlgorithm
Auto Trait Implementations§
impl Freeze for KeyAlgorithm
impl RefUnwindSafe for KeyAlgorithm
impl Send for KeyAlgorithm
impl Sync for KeyAlgorithm
impl Unpin for KeyAlgorithm
impl UnwindSafe for KeyAlgorithm
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)