1SC_BASE64_ENCODE(3)          OpenSC API reference          SC_BASE64_ENCODE(3)
2
3
4

NAME

6       sc_base64_encode - Encode a stream to base64
7

SYNOPSIS

9           #include <opensc.h>
10
11           int sc_base64_encode(const unsigned char *inbuf, size_t inlen,
12                                unsigned char *outbuf, size_t outlen,
13                                size_t linelength);
14
15
16

DESCRIPTION

18       This function encodes the buffer pointed to by inbuf of size inlen as
19       base64, and stores the result in outbuf, which is outlen bytes long. A
20       linefeed (\n) will be inserted every linelength bytes in the output
21       buffer.
22
23       You must ensure outbuf has enough space to store the base64-encoded
24       version of inbuf.
25

RETURN VALUE

27       Returns 0 if successful, or a negative value in case of error.
28
29
30
31opensc                            02/16/2010               SC_BASE64_ENCODE(3)
Impressum