diff --git a/docs/libssh2_session_supported_algs.3 b/docs/libssh2_session_supported_algs.3 index ec54246..74f0777 100644 --- a/docs/libssh2_session_supported_algs.3 +++ b/docs/libssh2_session_supported_algs.3 @@ -1,4 +1,4 @@ -.TH libssh2_session_supported_algs 3 "23 Oct 2011" "libssh2 1.3.1" "libssh2 manual" +.TH libssh2_session_supported_algs 3 "23 Oct 2011" "libssh2 1.4.0" "libssh2 manual" .SH NAME libssh2_session_supported_algs - get list of supported algorithms .SH SYNOPSIS @@ -28,6 +28,32 @@ calling this function, otherwise only "none" will be returned. If successful, the function will allocate and fill the array with supported algorithms (the same names as defined in RFC 4253). The array is not NULL terminated. +.SH EXAMPLE +.nf +#include "libssh2.h" + +const char **algorithms; +int rc, i; +LIBSSH2_SESSION *session; + +/* initilize session */ +session = libssh2_session_init(); +rc = libssh2_session_supported_algs(session, + LIBSSH2_METHOD_CRYPT_CS, + &algorithms); +if (rc>0) { + /* the call succeeded, do sth. with the list of algorithms + (e.g. list them)... */ + printf("Supported symmetric algorithms:\n"); + for ( i=0; i