Open SCAP Library

xbase64.h
1 /*
2 * Copyright 2009 Red Hat Inc., Durham, North Carolina.
3 * All Rights Reserved.
4 *
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.
9 *
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.
14 *
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 *
19 * Authors:
20 * "Daniel Kopecek" <dkopecek@redhat.com>
21 */
22
23 #include <stdio.h>
24 #include <stdint.h>
25 #include "../../../../common/util.h"
26
27 OSCAP_HIDDEN_START;
28
29 #if defined(WANT_XBASE64)
30 # ifndef XBASE64_H
31 # define XBASE64_H
32
33 # define XBASE64_PADDING_CHAR '_'
34
35 size_t xbase64_encode (const uint8_t *, size_t, char **);
36 size_t xbase64_decode (const char *, size_t, uint8_t **);
37
38 # endif /* XBASE64_H */
39 #endif /* WANT_XBASE64 */
40
41 #if defined(WANT_BASE64)
42 # ifndef BASE64_H
43 # define BASE64_H
44
45 # define BASE64_PADDING_CHAR '='
46
47 size_t base64_encode (const uint8_t *, size_t, char **);
48 size_t base64_decode (const char *, size_t, uint8_t **);
49
50 # endif /* BASE64_H */
51 #endif /* WANT_BASE64 */
52
53 OSCAP_HIDDEN_END;