00001 /* 00002 * Copyright 2009 Red Hat Inc., Durham, North Carolina. 00003 * All Rights Reserved. 00004 * 00005 * This library is free software; you can redistribute it and/or 00006 * modify it under the terms of the GNU Lesser General Public 00007 * License as published by the Free Software Foundation; either 00008 * version 2.1 of the License, or (at your option) any later version. 00009 * 00010 * This library is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 * Lesser General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU Lesser General Public 00016 * License along with this library; if not, write to the Free Software 00017 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00018 * 00019 * Authors: 00020 * "Daniel Kopecek" <dkopecek@redhat.com> 00021 */ 00022 00023 #include <stdio.h> 00024 #include <stdint.h> 00025 #include "../../../../common/util.h" 00026 00027 OSCAP_HIDDEN_START; 00028 00029 #if defined(WANT_XBASE64) 00030 # ifndef XBASE64_H 00031 # define XBASE64_H 00032 00033 # define XBASE64_PADDING_CHAR '_' 00034 00035 size_t xbase64_encode (const uint8_t *, size_t, char **); 00036 size_t xbase64_decode (const char *, size_t, uint8_t **); 00037 00038 # endif /* XBASE64_H */ 00039 #endif /* WANT_XBASE64 */ 00040 00041 #if defined(WANT_BASE64) 00042 # ifndef BASE64_H 00043 # define BASE64_H 00044 00045 # define BASE64_PADDING_CHAR '=' 00046 00047 size_t base64_encode (const uint8_t *, size_t, char **); 00048 size_t base64_decode (const char *, size_t, uint8_t **); 00049 00050 # endif /* BASE64_H */ 00051 #endif /* WANT_BASE64 */ 00052 00053 OSCAP_HIDDEN_END;