2 * GPAC - Multimedia Framework C SDK
\r
4 * Copyright (c) Jean Le Feuvre 2000-2005
\r
5 * All rights reserved
\r
7 * This file is part of GPAC / common tools sub-project
\r
9 * GPAC is free software; you can redistribute it and/or modify
\r
10 * it under the terms of the GNU Lesser General Public License as published by
\r
11 * the Free Software Foundation; either version 2, or (at your option)
\r
12 * any later version.
\r
14 * GPAC is distributed in the hope that it will be useful,
\r
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
17 * GNU Lesser General Public License for more details.
\r
19 * You should have received a copy of the GNU Lesser General Public
\r
20 * License along with this library; see the file COPYING. If not, write to
\r
21 * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
\r
25 #ifndef _GF_BASE_CODING_H_
\r
26 #define _GF_BASE_CODING_H_
\r
33 * \file <gpac/base_coding.h>
\r
34 * \brief Base coding functions.
\r
38 * \addtogroup bascod_grp base coding
\r
39 * \ingroup utils_grp
\r
40 * \brief Base Coding functions
\r
42 * This section documents the base encoding and decoding functions of the GPAC framework.
\r
46 #include <gpac/tools.h>
\r
49 *\brief base64 encoder
\r
51 *Encodes a data buffer to Base64
\r
52 *\param in_buffer input data buffer
\r
53 *\param in_buffer_size input data buffer size
\r
54 *\param out_buffer output Base64 buffer location
\r
55 *\param out_buffer_size output Base64 buffer allocated size
\r
56 *\return size of the encoded Base64 buffer
\r
57 *\note the encoded data buffer is not NULL-terminated.
\r
59 u32 gf_base64_encode(char *in_buffer, u32 in_buffer_size, char *out_buffer, u32 out_buffer_size);
\r
61 *\brief base64 decoder
\r
63 *Decodes a Base64 buffer to data
\r
64 *\param in_buffer input Base64 buffer
\r
65 *\param in_buffer_size input Base64 buffer size
\r
66 *\param out_buffer output data buffer location
\r
67 *\param out_buffer_size output data buffer allocated size
\r
68 *\return size of the decoded buffer
\r
70 u32 gf_base64_decode(char *in_buffer, u32 in_buffer_size, char *out_buffer, u32 out_buffer_size);
\r
73 *\brief base16 encoder
\r
75 *Encodes a data buffer to Base16
\r
76 *\param in_buffer input data buffer
\r
77 *\param in_buffer_size input data buffer size
\r
78 *\param out_buffer output Base16 buffer location
\r
79 *\param out_buffer_size output Base16 buffer allocated size
\r
80 *\return size of the encoded Base16 buffer
\r
81 *\note the encoded data buffer is not NULL-terminated.
\r
83 u32 gf_base16_encode(char *in_buffer, u32 in_buffer_size, char *out_buffer, u32 out_buffer_size);
\r
86 *\brief base16 decoder
\r
88 *Decodes a Base16 buffer to data
\r
89 *\param in_buffer input Base16 buffer
\r
90 *\param in_buffer_size input Base16 buffer size
\r
91 *\param out_buffer output data buffer location
\r
92 *\param out_buffer_size output data buffer allocated size
\r
93 *\return size of the decoded buffer
\r
95 u32 gf_base16_decode(char *in_buffer, u32 in_buffer_size, char *out_buffer, u32 out_buffer_size);
\r
104 #endif /*_GF_BASE_CODING_H_*/
\r