jabberd2  2.5.0
base64.h
Go to the documentation of this file.
1 /*
2  * jabberd - Jabber Open Source Server
3  * Copyright (c) 2002-2004 Jeremie Miller, Thomas Muldowney,
4  * Ryan Eatmon, Robert Norris
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA02111-1307USA
19  */
20 
28 #ifndef INCL_UTIL_BASE64_H
29 #define INCL_UTIL_BASE64_H 1
30 
31 /* jabberd2 Windows DLL */
32 #ifndef JABBERD2_API
33 # ifdef _WIN32
34 # ifdef JABBERD2_EXPORTS
35 # define JABBERD2_API __declspec(dllexport)
36 # else /* JABBERD2_EXPORTS */
37 # define JABBERD2_API __declspec(dllimport)
38 # endif /* JABBERD2_EXPORTS */
39 # else /* _WIN32 */
40 # define JABBERD2_API extern
41 # endif /* _WIN32 */
42 #endif /* JABBERD2_API */
43 
44 /* base64 functions */
45 JABBERD2_API int apr_base64_decode_len(const char *bufcoded);
46 JABBERD2_API int apr_base64_decode(char *bufplain, const char *bufcoded);
48 JABBERD2_API int apr_base64_encode(char *encoded, const unsigned char *string, int len);
49 
50 /* convenience, result string must be free()'d by caller */
51 JABBERD2_API char *b64_encode(char *buf, int len);
52 JABBERD2_API char *b64_decode(char *buf);
53 
54 #endif
JABBERD2_API int apr_base64_encode_len(int len)
Definition: base64.c:213
#define JABBERD2_API
Definition: base64.h:40
JABBERD2_API char * b64_encode(char *buf, int len)
Definition: base64.c:260
JABBERD2_API int apr_base64_encode(char *encoded, const unsigned char *string, int len)
JABBERD2_API char * b64_decode(char *buf)
Definition: base64.c:275
JABBERD2_API int apr_base64_decode_len(const char *bufcoded)
JABBERD2_API int apr_base64_decode(char *bufplain, const char *bufcoded)