Tizen 2.0 Release
[external/libgnutls26.git] / doc / manpages / gnutls_prf.3
1 .\" DO NOT MODIFY THIS FILE!  It was generated by gdoc.
2 .TH "gnutls_prf" 3 "2.12.6.1" "gnutls" "gnutls"
3 .SH NAME
4 gnutls_prf \- API function
5 .SH SYNOPSIS
6 .B #include <gnutls/gnutls.h>
7 .sp
8 .BI "int gnutls_prf(gnutls_session_t " session ", size_t " label_size ", const char * " label ", int " server_random_first ", size_t " extra_size ", const char * " extra ", size_t " outsize ", char * " out ");"
9 .SH ARGUMENTS
10 .IP "gnutls_session_t session" 12
11 is a \fBgnutls_session_t\fP structure.
12 .IP "size_t label_size" 12
13 length of the \fIlabel\fP variable.
14 .IP "const char * label" 12
15 label used in PRF computation, typically a short string.
16 .IP "int server_random_first" 12
17 non\-0 if server random field should be first in seed
18 .IP "size_t extra_size" 12
19 length of the \fIextra\fP variable.
20 .IP "const char * extra" 12
21 optional extra data to seed the PRF with.
22 .IP "size_t outsize" 12
23 size of pre\-allocated output buffer to hold the output.
24 .IP "char * out" 12
25 pre\-allocate buffer to hold the generated data.
26 .SH "DESCRIPTION"
27 Apply the TLS Pseudo\-Random\-Function (PRF) using the master secret
28 on some data, seeded with the client and server random fields.
29
30 The \fIlabel\fP variable usually contain a string denoting the purpose
31 for the generated data.  The \fIserver_random_first\fP indicate whether
32 the client random field or the server random field should be first
33 in the seed.  Non\-0 indicate that the server random field is first,
34 0 that the client random field is first.
35
36 The \fIextra\fP variable can be used to add more data to the seed, after
37 the random variables.  It can be used to tie make sure the
38 generated output is strongly connected to some additional data
39 (e.g., a string used in user authentication).
40
41 The output is placed in *\fIOUT\fP, which must be pre\-allocated.
42 .SH "RETURNS"
43 \fBGNUTLS_E_SUCCESS\fP on success, or an error code.
44 .SH "REPORTING BUGS"
45 Report bugs to <bug-gnutls@gnu.org>.
46 GnuTLS home page: http://www.gnu.org/software/gnutls/
47 General help using GNU software: http://www.gnu.org/gethelp/
48 .SH COPYRIGHT
49 Copyright \(co 2008 Free Software Foundation.
50 .br
51 Copying and distribution of this file, with or without modification,
52 are permitted in any medium without royalty provided the copyright
53 notice and this notice are preserved.
54 .SH "SEE ALSO"
55 The full documentation for
56 .B gnutls
57 is maintained as a Texinfo manual.  If the
58 .B info
59 and
60 .B gnutls
61 programs are properly installed at your site, the command
62 .IP
63 .B info gnutls
64 .PP
65 should give you access to the complete manual.