pub struct PublicKey {
pub algorithm: String,
pub blob: String,
pub comment: String,
}Expand description
A parsed public key: algorithm blob, and the comment it came with.
Fields§
§algorithm: String§blob: StringStandard base64 of the wire-format key.
comment: StringImplementations§
Source§impl PublicKey
impl PublicKey
Sourcepub fn parse(line: &str) -> Result<PublicKey, String>
pub fn parse(line: &str) -> Result<PublicKey, String>
One authorized_keys/known_hosts-style line, or what is wrong
with it. Options before the key are refused, not dropped: a key
pasted with command="..." is not the key its owner thinks it is.
Sourcepub fn fingerprint(&self) -> String
pub fn fingerprint(&self) -> String
OpenSSH’s fingerprint: SHA256: and unpadded base64.
Trait Implementations§
impl Eq for PublicKey
impl StructuralPartialEq for PublicKey
Auto Trait Implementations§
impl Freeze for PublicKey
impl RefUnwindSafe for PublicKey
impl Send for PublicKey
impl Sync for PublicKey
impl Unpin for PublicKey
impl UnsafeUnpin for PublicKey
impl UnwindSafe for PublicKey
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.