pub fn fingerprint(&self) -> Result<String> {
        let key = thrussh_keys::key::parse_public_key(&self.ssh_key)?;

        let raw_hex = hex::encode(
            base64::decode(&key.fingerprint()).map_err(|_| thrussh_keys::Error::CouldNotReadKey)?,
        );
        let mut hex = String::with_capacity(raw_hex.len() + (raw_hex.len() / 2 - 1));

        for (i, c) in raw_hex.chars().enumerate() {
            if i != 0 && i % 2 == 0 {
                hex.push(':');
            }

            hex.push(c);
        }

        Ok(hex)
    }
/// Retrieves the key fingerprint, encoded in hex and separated in two character chunks
/// with colons.
Retrieves the key fingerprint, encoded in hex and separated in two character chunks
with colons.
Retrieves the key fingerprint encoded in hex and separated in two character chunks with colons .
pub fn fingerprint(&self) -> Result<String> {
        let key = thrussh_keys::key::parse_public_key(&self.ssh_key)?;
        let raw_hex = hex::encode(
            base64::decode(&key.fingerprint()).map_err(|_| thrussh_keys::Error::CouldNotReadKey)?,
        );
        let mut hex = String::with_capacity(raw_hex.len() + (raw_hex.len() / 2 - 1));
        for (i, c) in raw_hex.chars().enumerate() {
            if i != 0 && i % 2 == 0 {
                hex.push(':');
            }
            hex.push(c);
        }
        Ok(hex)
    }
pub fn fingerprint ( & self ) -> Result < String > { let key = thrussh_keys :: key :: parse_public_key ( & self . ssh_key ) ? ; let raw_hex = hex :: encode ( base64 :: decode ( & key . fingerprint ( ) ) . map_err ( | _ | thrussh_keys :: Error :: CouldNotReadKey ) ? , ) ; let mut hex = String :: with_capacity ( raw_hex . len ( ) + ( raw_hex . len ( ) / 2 - 1 ) ) ; for ( i , c ) in raw_hex . chars ( ) . enumerate ( ) { if i != 0 && i % 2 == 0 { hex . push ( ':' ) ; } hex . push ( c ) ; } Ok ( hex ) }
Retrieves the key fingerprint, encoded in hex and separated in two character chunks
with colons.
Retrieves the key fingerprint encoded in hex and separated in two character chunks with colons .
&self
&self