1gnutls_pem_base64_encode(3) gnutls gnutls_pem_base64_encode(3)
2
3
4
6 gnutls_pem_base64_encode - API function
7
9 #include <gnutls/gnutls.h>
10
11 int gnutls_pem_base64_encode(const char * msg, const gnutls_datum_t *
12 data, char * result, size_t * result_size);
13
15 const char * msg
16 is a message to be put in the header (may be NULL)
17
18 const gnutls_datum_t * data
19 contain the raw data
20
21 char * result
22 the place where base64 data will be copied
23
24 size_t * result_size
25 holds the size of the result
26
28 This function will convert the given data to printable data, using the
29 base64 encoding. This is the encoding used in PEM messages.
30
31 The output string will be null terminated, although the output size
32 will not include the terminating null.
33
35 On success GNUTLS_E_SUCCESS (0) is returned, GNUTLS_E_SHORT_MEMORY_BUF‐
36 FER is returned if the buffer given is not long enough, or 0 on suc‐
37 cess.
38
40 Report bugs to <bugs@gnutls.org>.
41 Home page: https://www.gnutls.org
42
43
45 Copyright © 2001- Free Software Foundation, Inc., and others.
46 Copying and distribution of this file, with or without modification,
47 are permitted in any medium without royalty provided the copyright no‐
48 tice and this notice are preserved.
49
51 The full documentation for gnutls is maintained as a Texinfo manual.
52 If the /usr/share/doc/gnutls/ directory does not contain the HTML form
53 visit
54
55 https://www.gnutls.org/manual/
56
57gnutls 3.7.8 gnutls_pem_base64_encode(3)