Struct mz_ssh_util::keys::SshKeyPair
source · pub struct SshKeyPair { /* private fields */ }
Expand description
A SSH key pair consisting of a public and private key.
Implementations§
source§impl SshKeyPair
impl SshKeyPair
sourcepub fn new() -> Result<SshKeyPair, Error>
pub fn new() -> Result<SshKeyPair, Error>
Generates a new SSH key pair.
Ed25519 keys are generated via OpenSSL, using ssh_key
to convert
them into the OpenSSH format.
sourcepub fn ssh_public_key(&self) -> String
pub fn ssh_public_key(&self) -> String
Returns the public key encoded in the OpenSSH format.
sourcepub fn ssh_private_key(&self) -> Zeroizing<String>
pub fn ssh_private_key(&self) -> Zeroizing<String>
Return the private key encoded in the OpenSSH format.
Trait Implementations§
source§impl Clone for SshKeyPair
impl Clone for SshKeyPair
source§fn clone(&self) -> SshKeyPair
fn clone(&self) -> SshKeyPair
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for SshKeyPair
impl Debug for SshKeyPair
source§impl<'de> Deserialize<'de> for SshKeyPair
impl<'de> Deserialize<'de> for SshKeyPair
source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq<SshKeyPair> for SshKeyPair
impl PartialEq<SshKeyPair> for SshKeyPair
source§impl Serialize for SshKeyPair
impl Serialize for SshKeyPair
impl Eq for SshKeyPair
Auto Trait Implementations§
impl RefUnwindSafe for SshKeyPair
impl Send for SshKeyPair
impl Sync for SshKeyPair
impl Unpin for SshKeyPair
impl UnwindSafe for SshKeyPair
Blanket Implementations§
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.