[−][src]Struct sshkeys::Fingerprint
A type that represents an OpenSSH public key fingerprint.
Fields
kind: FingerprintKind
The kind used to represent the fingerprint.
hash: String
The 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 = sshkeys::Fingerprint::compute(sshkeys::FingerprintKind::Sha256, "some data".as_bytes()); assert_eq!(fp.kind, sshkeys::FingerprintKind::Sha256); assert_eq!(fp.hash, "EweZDmulyhRes16ZGCqb7EZTG8VN32VqYCx4D6AkDe4");
Trait Implementations
impl Debug for Fingerprint
[src]
impl Display 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,
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> Same<T> for T
type Output = T
Should always be Self
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.
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>,