pub enum KeyType {
Rsa(u32),
ECDH,
EdDSA,
ECDSA(ECCCurve),
}
Variants§
Rsa(u32)
Encryption & Signing with RSA an the given bitsize.
ECDH
Encrypting with Curve25519
EdDSA
Signing with Curve25519
ECDSA(ECCCurve)
Signing with ECDSA
Implementations§
source§impl KeyType
impl KeyType
pub fn to_alg(self) -> PublicKeyAlgorithm
pub fn generate( self, passphrase: Option<String> ) -> Result<(PublicParams, SecretParams), Error>
pub fn generate_with_rng<R>( self, rng: &mut R, passphrase: Option<String> ) -> Result<(PublicParams, SecretParams), Error>where R: Rng + CryptoRng,
Trait Implementations§
source§impl PartialEq<KeyType> for KeyType
impl PartialEq<KeyType> for KeyType
impl Copy for KeyType
impl Eq for KeyType
impl StructuralEq for KeyType
impl StructuralPartialEq for KeyType
Auto Trait Implementations§
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
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.