Open SCAP Library
Loading...
Searching...
No Matches
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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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
28#if defined(WANT_XBASE64)
29# ifndef XBASE64_H
30# define XBASE64_H
31
32# define XBASE64_PADDING_CHAR '_'
33
34size_t xbase64_encode (const uint8_t *, size_t, char **);
35size_t xbase64_decode (const char *, size_t, uint8_t **);
36
37# endif /* XBASE64_H */
38#endif /* WANT_XBASE64 */
39
40#if defined(WANT_BASE64)
41# ifndef BASE64_H
42# define BASE64_H
43
44# define BASE64_PADDING_CHAR '='
45
46size_t base64_encode (const uint8_t *, size_t, char **);
47size_t base64_decode (const char *, size_t, uint8_t **);
48
49# endif /* BASE64_H */
50#endif /* WANT_BASE64 */
51