3
Copyright (C) 2003 Elwood C. Downey
5
This library is free software; you can redistribute it and/or
6
modify it under the terms of the GNU Lesser General Public
7
License as published by the Free Software Foundation; either
8
version 2.1 of the License, or (at your option) any later version.
10
This library is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
Lesser General Public License for more details.
15
You should have received a copy of the GNU Lesser General Public
16
License along with this library; if not, write to the Free Software
17
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
29
* \defgroup base64 Base 64 Functions: Convert from and to base64
33
/** \brief Convert bytes array to base64.
34
\param out output buffer in base64. The buffer size must be at least (4 * inlen / 3 + 4) bytes long.
35
\param in input binary buffer
36
\param inlen number of bytes to convert
37
\return 0 on success, -1 on failure.
39
extern int to64frombits(unsigned char *out, const unsigned char *in,
42
/** \brief Convert base64 to bytes array.
43
\param out output buffer in bytes. The buffer size must be at least (3 * size_of_in_buffer / 4) bytes long.
44
\param in input base64 buffer
45
\return 0 on success, -1 on failure.
48
extern int from64tobits(char *out, const char *in);