Skip to content

Commit 13176ed

Browse files
committed
Add fingerprint function on keypairs
1 parent 87afc44 commit 13176ed

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/clj_ssh/ssh.clj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,11 @@
179179
{:reason :do-not-know-how-to-create-keypair
180180
:args options}))))
181181

182+
(defn fingerprint
183+
"Return a keypair's fingerprint."
184+
[^KeyPair keypair]
185+
(.getFingerPrint keypair))
186+
182187
;; JSch's IdentityFile has a private constructor that would let us avoid this
183188
;; were it public.
184189
(deftype KeyPairIdentity [^JSch jsch ^String identity ^KeyPair kpair]

0 commit comments

Comments
 (0)