func KeyFingerprint(key string) (fingerprint, comment string, err error) {
	ak, err := ParseAuthorisedKey(key)
	if err != nil {
		return "", "", errors.Errorf("generating key fingerprint: %v", err)
	}
	hash := md5.New()
	hash.Write(ak.Key)
	sum := hash.Sum(nil)
	var buf bytes.Buffer
	for i := 0; i < hash.Size(); i++ {
		if i > 0 {
			buf.WriteByte(':')
		}
		buf.WriteString(fmt.Sprintf("%02x", sum[i]))
	}
	return buf.String(), ak.Comment, nil
}
// KeyFingerprint returns the fingerprint and comment for the specified key
// in authorized_key format. Fingerprints are generated according to RFC4716.
// See ttp://www.ietf.org/rfc/rfc4716.txt, section 4.
KeyFingerprint returns the fingerprint and comment for the specified key
in authorized_key format. Fingerprints are generated according to RFC4716.
// KeyFingerprint returns the fingerprint and comment for the specified key // in authorized_key format . Fingerprints are generated according to RFC4716 . // See ttp : // www . ietf . org / rfc / rfc4716 . txt section 4 .
func KeyFingerprint(key string) (fingerprint, comment string, err error) {
	ak, err := ParseAuthorisedKey(key)
	if err != nil {
		return "", "", errors.Errorf("generating key fingerprint: %v", err)
	}
	hash := md5.New()
	hash.Write(ak.Key)
	sum := hash.Sum(nil)
	var buf bytes.Buffer
	for i := 0; i < hash.Size(); i++ {
		if i > 0 {
			buf.WriteByte(':')
		}
		buf.WriteString(fmt.Sprintf("%02x", sum[i]))
	}
	return buf.String(), ak.Comment, nil
}
func KeyFingerprint ( key string ) ( fingerprint , comment string , err error ) { ak , err := ParseAuthorisedKey ( key ) if err != nil { return " " , " " , errors . Errorf ( " " , err ) } hash := md5 . New ( ) hash . Write ( ak . Key ) sum := hash . Sum ( nil ) var buf bytes . Buffer for i := 0 ; i < hash . Size ( ) ; i ++ { if i > 0 { buf . WriteByte ( ':' ) } buf . WriteString ( fmt . Sprintf ( " " , sum [ i ] ) ) } return buf . String ( ) , ak . Comment , nil }
KeyFingerprint returns the fingerprint and comment for the specified key
in authorized_key format.
KeyFingerprint returns the fingerprint and comment for the specified key in authorized_key format .