Tizen 2.0 Release
[external/libgnutls26.git] / doc / manpages / gnutls_dh_params_generate2.3
1 .\" DO NOT MODIFY THIS FILE!  It was generated by gdoc.
2 .TH "gnutls_dh_params_generate2" 3 "2.12.6.1" "gnutls" "gnutls"
3 .SH NAME
4 gnutls_dh_params_generate2 \- API function
5 .SH SYNOPSIS
6 .B #include <gnutls/gnutls.h>
7 .sp
8 .BI "int gnutls_dh_params_generate2(gnutls_dh_params_t " params ", unsigned int " bits ");"
9 .SH ARGUMENTS
10 .IP "gnutls_dh_params_t params" 12
11 Is the structure that the DH parameters will be stored
12 .IP "unsigned int bits" 12
13 is the prime's number of bits
14 .SH "DESCRIPTION"
15 This function will generate a new pair of prime and generator for use in
16 the Diffie\-Hellman key exchange. The new parameters will be allocated using
17 \fBgnutls_malloc()\fP and will be stored in the appropriate datum.
18 This function is normally slow.
19
20 Do not set the number of bits directly, use \fBgnutls_sec_param_to_pk_bits()\fP to
21 get bits for \fBGNUTLS_PK_DSA\fP.
22 Also note that the DH parameters are only useful to servers.
23 Since clients use the parameters sent by the server, it's of
24 no use to call this in client side.
25 .SH "RETURNS"
26 On success, \fBGNUTLS_E_SUCCESS\fP (zero) is returned,
27 otherwise an error code is returned.
28 .SH "REPORTING BUGS"
29 Report bugs to <bug-gnutls@gnu.org>.
30 GnuTLS home page: http://www.gnu.org/software/gnutls/
31 General help using GNU software: http://www.gnu.org/gethelp/
32 .SH COPYRIGHT
33 Copyright \(co 2008 Free Software Foundation.
34 .br
35 Copying and distribution of this file, with or without modification,
36 are permitted in any medium without royalty provided the copyright
37 notice and this notice are preserved.
38 .SH "SEE ALSO"
39 The full documentation for
40 .B gnutls
41 is maintained as a Texinfo manual.  If the
42 .B info
43 and
44 .B gnutls
45 programs are properly installed at your site, the command
46 .IP
47 .B info gnutls
48 .PP
49 should give you access to the complete manual.