pub struct HybridPrivateKey {
pub ssh_key: PrivateKey,
pub algorithm: KeyAlgorithm,
pub file_path: PathBuf,
pub comment: String,
}
Expand description
SSH private key wrapper for hybrid decryption
Fields§
§ssh_key: PrivateKey
The raw SSH private key
algorithm: KeyAlgorithm
The algorithm type
file_path: PathBuf
The file path where this key was found
comment: String
Key comment/identifier
Implementations§
Source§impl HybridPrivateKey
impl HybridPrivateKey
Sourcepub fn new(
ssh_key: SshPrivateKey,
file_path: PathBuf,
) -> Result<Self, SshKeyError>
pub fn new( ssh_key: SshPrivateKey, file_path: PathBuf, ) -> Result<Self, SshKeyError>
Create a new hybrid private key
Sourcepub fn display_name(&self) -> String
pub fn display_name(&self) -> String
Get a display name for this key
Sourcepub fn public_key(&self) -> HybridPublicKey
pub fn public_key(&self) -> HybridPublicKey
Get the corresponding public key
Trait Implementations§
Source§impl Clone for HybridPrivateKey
impl Clone for HybridPrivateKey
Source§fn clone(&self) -> HybridPrivateKey
fn clone(&self) -> HybridPrivateKey
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for HybridPrivateKey
impl RefUnwindSafe for HybridPrivateKey
impl Send for HybridPrivateKey
impl Sync for HybridPrivateKey
impl Unpin for HybridPrivateKey
impl UnwindSafe for HybridPrivateKey
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more