pub enum KeyType {
Rsa(u32),
ECDH,
EdDSA,
}
Variants
Rsa(u32)
Encryption & Signing with RSA an the given bitsize.
ECDH
Encrypting with Curve25519
EdDSA
Signing with Curve25519
Implementations
sourceimpl 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
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more