Enum thrussh_keys::key::KeyPair [−][src]
pub enum KeyPair { Ed25519(SecretKey), RSA { key: Rsa<Private>, hash: SignatureHash, }, }
Expand description
Public key exchange algorithms.
Variants
Ed25519(SecretKey)
Show fields
Fields of RSA
key: Rsa<Private>
hash: SignatureHash
Implementations
impl KeyPair
[src]
impl KeyPair
[src]pub fn clone_public_key(&self) -> PublicKey
[src]
pub fn clone_public_key(&self) -> PublicKey
[src]Copy the public key of this algorithm.
pub fn generate_ed25519() -> Option<Self>
[src]
pub fn generate_ed25519() -> Option<Self>
[src]Generate a key pair.
pub fn generate_rsa(bits: usize, hash: SignatureHash) -> Option<Self>
[src]
Trait Implementations
impl PublicKeyBase64 for KeyPair
[src]
impl PublicKeyBase64 for KeyPair
[src]fn public_key_bytes(&self) -> Vec<u8>
[src]
fn public_key_bytes(&self) -> Vec<u8>
[src]Create the base64 part of the public key blob.