Enum thrussh_keys::key::KeyPair
source · pub enum KeyPair {
Ed25519(SecretKey),
RSA {
key: Rsa<Private>,
hash: SignatureHash,
},
}
Expand description
Public key exchange algorithms.
Variants§
Implementations§
source§impl KeyPair
impl KeyPair
sourcepub fn clone_public_key(&self) -> PublicKey
pub fn clone_public_key(&self) -> PublicKey
Copy the public key of this algorithm.
sourcepub fn generate_ed25519() -> Option<Self>
pub fn generate_ed25519() -> Option<Self>
Generate a key pair.
pub fn generate_rsa(bits: usize, hash: SignatureHash) -> Option<Self>
Trait Implementations§
source§impl PublicKeyBase64 for KeyPair
impl PublicKeyBase64 for KeyPair
source§fn public_key_base64(&self) -> String
fn public_key_base64(&self) -> String
Create the base64 part of the public key blob.