Struct sshcerts::PrivateKey
source · [−]pub struct PrivateKey {
pub key_type: KeyType,
pub kind: PrivateKeyKind,
pub pubkey: PublicKey,
pub comment: Option<String>,
}Expand description
A type which represents an OpenSSH public key.
Fields
key_type: KeyTypeKey type.
kind: PrivateKeyKindThe kind of public key.
pubkey: PublicKeyThe corresponding public key
comment: Option<String>Associated comment, if any.
Implementations
pub fn from_path_with_passphrase<P: AsRef<Path>>(
path: P,
passphrase: Option<String>
) -> Result<PrivateKey, Error>
pub fn from_path_with_passphrase<P: AsRef<Path>>(
path: P,
passphrase: Option<String>
) -> Result<PrivateKey, Error>
Reads an OpenSSH private key from a given path and passphrase
Reads an OpenSSH private key from a given path.
pub fn from_string_with_passphrase(
contents: &str,
passphrase: Option<String>
) -> Result<PrivateKey, Error>
pub fn from_string_with_passphrase(
contents: &str,
passphrase: Option<String>
) -> Result<PrivateKey, Error>
Reads an OpenSSH private key from a given string and passphrase
Reads an OpenSSH private key from a given string.
Trait Implementations
This is in this file to prevent a circular dependency between PrivateKey and the signer module.
This method tests for self and other values to be equal, and is used
by ==. Read more
This method tests for !=.
Auto Trait Implementations
impl RefUnwindSafe for PrivateKey
impl Send for PrivateKey
impl Sync for PrivateKey
impl Unpin for PrivateKey
impl UnwindSafe for PrivateKey
Blanket Implementations
Mutably borrows from an owned value. Read more