Enum thrussh_keys::key::PublicKey
source · pub enum PublicKey {
// some variants omitted
}
Expand description
Public key
Implementations§
source§impl PublicKey
impl PublicKey
sourcepub fn parse(algo: &[u8], pubkey: &[u8]) -> Result<Self, Error>
pub fn parse(algo: &[u8], pubkey: &[u8]) -> Result<Self, Error>
Parse a public key in SSH format.
sourcepub fn verify_detached(&self, buffer: &[u8], sig: &[u8]) -> bool
pub fn verify_detached(&self, buffer: &[u8], sig: &[u8]) -> bool
Verify a signature.
sourcepub fn fingerprint(&self) -> String
pub fn fingerprint(&self) -> String
Compute the key fingerprint, hashed with sha2-256.
pub fn set_algorithm(&mut self, _: &[u8])
Trait Implementations§
source§impl PartialEq<PublicKey> for PublicKey
impl PartialEq<PublicKey> for PublicKey
source§impl PublicKeyBase64 for PublicKey
impl PublicKeyBase64 for PublicKey
source§fn public_key_bytes(&self) -> Vec<u8>
fn public_key_bytes(&self) -> Vec<u8>
Create the base64 part of the public key blob.
fn public_key_base64(&self) -> String
impl Eq for PublicKey
impl StructuralEq for PublicKey
impl StructuralPartialEq for PublicKey
Auto Trait Implementations§
impl RefUnwindSafe for PublicKey
impl Send for PublicKey
impl Sync for PublicKey
impl Unpin 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