1gnutls_pem_base64_encode2(3) gnutls gnutls_pem_base64_encode2(3)
2
3
4
6 gnutls_pem_base64_encode2 - API function
7
9 #include <gnutls/gnutls.h>
10
11 int gnutls_pem_base64_encode2(const char * header, const gnutls_datum_t
12 * data, gnutls_datum_t * result);
13
15 const char * header
16 is a message to be put in the encoded header (may be NULL)
17
18 const gnutls_datum_t * data
19 contains the raw data
20
21 gnutls_datum_t * result
22 will hold the newly allocated encoded data
23
25 This function will convert the given data to printable data, using the
26 base64 encoding. This is the encoding used in PEM messages. This
27 function will allocate the required memory to hold the encoded data.
28
29 You should use gnutls_free() to free the returned data.
30
31 Note, that prior to GnuTLS 3.4.0 this function was available under the
32 name gnutls_pem_base64_encode_alloc(). There is compatibility macro
33 pointing to this function.
34
36 On success, GNUTLS_E_SUCCESS (0) is returned, otherwise an error code
37 is returned.
38
40 3.4.0
41
43 Report bugs to <bugs@gnutls.org>.
44 Home page: https://www.gnutls.org
45
46
48 Copyright © 2001-2019 Free Software Foundation, Inc., and others.
49 Copying and distribution of this file, with or without modification,
50 are permitted in any medium without royalty provided the copyright
51 notice and this notice are preserved.
52
54 The full documentation for gnutls is maintained as a Texinfo manual.
55 If the /usr/share/doc/gnutls/ directory does not contain the HTML form
56 visit
57
58 https://www.gnutls.org/manual/
59
60gnutls 3.6.11 gnutls_pem_base64_encode2(3)