pub enum KeyType {
Rsa(u32),
ECDH,
EdDSA,
ECDSA(ECCCurve),
Dsa(DsaKeySize),
}
Variants§
Rsa(u32)
Encryption & Signing with RSA and the given bitsize.
ECDH
Encrypting with Curve25519
EdDSA
Signing with Curve25519
ECDSA(ECCCurve)
Signing with ECDSA
Dsa(DsaKeySize)
Signing with DSA for the given bitsize.
Implementations§
source§impl KeyType
impl KeyType
pub fn to_alg(&self) -> PublicKeyAlgorithm
pub fn generate( &self, passphrase: Option<String> ) -> Result<(PublicParams, SecretParams)>
pub fn generate_with_rng<R: Rng + CryptoRng>( &self, rng: &mut R, passphrase: Option<String> ) -> Result<(PublicParams, SecretParams)>
Trait Implementations§
source§impl PartialEq for KeyType
impl PartialEq for KeyType
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