pub enum KeyType {
Rsa(u32),
ECDH(ECCCurve),
EdDSALegacy,
ECDSA(ECCCurve),
Dsa(DsaKeySize),
Ed25519,
X25519,
X448,
}
Variants§
Rsa(u32)
Encryption & Signing with RSA and the given bitsize.
ECDH(ECCCurve)
Encrypting with ECDH
EdDSALegacy
Signing with Curve25519, legacy format (deprecated in RFC 9580)
ECDSA(ECCCurve)
Signing with ECDSA
Dsa(DsaKeySize)
Signing with DSA for the given bitsize.
Ed25519
Signing with Ed25519
X25519
Encrypting with X25519
X448
Encrypting with X448
Implementations§
Source§impl KeyType
impl KeyType
pub fn to_alg(&self) -> PublicKeyAlgorithm
pub fn generate<R: Rng + CryptoRng>( &self, rng: R, ) -> Result<(PublicParams, SecretParams)>
Trait Implementations§
impl Eq for KeyType
impl StructuralPartialEq for KeyType
Auto Trait Implementations§
impl Freeze for KeyType
impl RefUnwindSafe for KeyType
impl Send for KeyType
impl Sync for KeyType
impl Unpin for KeyType
impl UnwindSafe for KeyType
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