Struct sshcerts::ssh::Fingerprint [−][src]
A type that represents an OpenSSH public key fingerprint.
Fields
kind: FingerprintKindThe kind used to represent the fingerprint.
hash: StringThe computed fingerprint.
Implementations
impl Fingerprint[src]
pub fn compute<T: ?Sized + AsRef<[u8]>>(
kind: FingerprintKind,
data: &T
) -> Fingerprint[src]
kind: FingerprintKind,
data: &T
) -> Fingerprint
Computes the fingerprint of a byte sequence using a given fingerprint representation.
This method computes a fingerprint the way OpenSSH does it and is generally being used to compute the fingerprint of an already encoded OpenSSH public key.
Example
let fp = Fingerprint::compute(FingerprintKind::Sha256, "some data".as_bytes()); assert_eq!(fp.kind, FingerprintKind::Sha256); assert_eq!(fp.hash, "EweZDmulyhRes16ZGCqb7EZTG8VN32VqYCx4D6AkDe4");
Trait Implementations
impl Debug for Fingerprint[src]
impl Display for Fingerprint[src]
impl PartialEq<Fingerprint> for Fingerprint[src]
fn eq(&self, other: &Fingerprint) -> bool[src]
fn ne(&self, other: &Fingerprint) -> bool[src]
impl StructuralPartialEq for Fingerprint[src]
Auto Trait Implementations
impl RefUnwindSafe for Fingerprint
impl Send for Fingerprint
impl Sync for Fingerprint
impl Unpin for Fingerprint
impl UnwindSafe for Fingerprint
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized, [src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,