app/models/metasploit/credential/ssh_key.rb in metasploit-credential-0.7.13-java vs app/models/metasploit/credential/ssh_key.rb in metasploit-credential-0.7.14
- old
+ new
@@ -62,9 +62,17 @@
else
false
end
end
+ # The {#data key data}'s fingerprint, suitable for displaying to the
+ # user.
+ #
+ # @return [String]
+ def to_s
+ data ? openssl_pkey_pkey.fingerprint : ''
+ end
+
private
# Converts the private key file data in {#data} to an `OpenSSL::PKey::PKey` subclass instance.
#
# @return [OpenSSL::PKey::PKey]