Enum thrussh_keys::key::KeyPair
[−]
[src]
pub enum KeyPair { Ed25519(SecretKey), RSA { key: Rsa, hash: SignatureHash, }, }
Public key exchange algorithms.
Variants
Ed25519(SecretKey)
RSA
Fields of RSA
key: Rsa | |
hash: SignatureHash |
Methods
impl KeyPair
[src]
fn clone_public_key(&self) -> PublicKey
[src]
Copy the public key of this algorithm.
fn name(&self) -> &'static str
[src]
Name of this key algorithm.
fn generate(t: Name) -> Option<Self>
[src]
Generate a key pair.
fn sign_detached(&self, to_sign: &[u8]) -> Result<Signature, Error>
[src]
Sign a slice using this algorithm.
Trait Implementations
impl Debug for KeyPair
[src]
impl PublicKeyBase64 for KeyPair
[src]
fn public_key_base64(&self) -> String
[src]
Create the base64 part of the public key blob.