summaryrefslogtreecommitdiff
path: root/doc/api-sessions.texi
diff options
context:
space:
mode:
authorArtyom Poptsov <poptsov.artyom@gmail.com>2014-05-31 01:11:19 +0400
committerArtyom Poptsov <poptsov.artyom@gmail.com>2014-05-31 01:11:19 +0400
commitec0c0e9dcf97979ac8a5fa970b86183c47731461 (patch)
tree08c77973494313d83721f94a9aee663b35479247 /doc/api-sessions.texi
parentssh/session.scm (bytevector->hex-string): New procedure. (diff)
downloadguile-ssh-ec0c0e9dcf97979ac8a5fa970b86183c47731461.tar.gz
doc/api-sessions.texi (Sessions): Update.
* doc/api-sessions.texi (Sessions): Update description of `get-public-key-hash'. Add documentation for `bytevector->hex-string'. Add examples.
Diffstat (limited to 'doc/api-sessions.texi')
-rw-r--r--doc/api-sessions.texi26
1 files changed, 24 insertions, 2 deletions
diff --git a/doc/api-sessions.texi b/doc/api-sessions.texi
index ca0bc4a..64258b8 100644
--- a/doc/api-sessions.texi
+++ b/doc/api-sessions.texi
@@ -249,8 +249,30 @@ will be created if host key is accepted.
@deffn {Scheme Procedure} get-public-key-hash session
@cindex MD5 hash
-Get MD5 hash of a public key. Return MD5 hash on success, @code{#f}
-on error.
+Get MD5 hash of a public key as a bytevector. Return the bytevector
+on success, @code{#f} on error.
+
+Example:
+
+@lisp
+(get-public-key-hash session)
+@result{} #vu8(15 142 110 203 162 228 250 211 20 212 26 217 118 57 217 66)
+@end lisp
+
+@end deffn
+
+@deffn {Scheme Procedure} bytevector->hex-string bv
+@cindex MD5 hash
+Convert the given bytevector @var{bv} to a colon separated string.
+
+Example:
+
+@lisp
+(let ((hash (get-public-key-hash session)))
+ (bytevector->hex-string hash))
+@result{} "0f:8e:6e:cb:a2:e4:fa:d3:14:d4:1a:d9:76:39:d9:42"
+@end lisp
+
@end deffn
@deffn {Scheme Procedure} write-known-host! session