1 /*! 2 * \file 3 * \brief base 64 encoding and decoding functions 4 * adapted from Bob Trower 08/04/01 5 * \ingroup utils 6 * 7 * \date 04/26/2002 8 * \author Joerg Nothnagel <jn6@os.inf.tu-dresden.de> 9 */ 10 /* 11 * (c) 2008-2009 Author(s) 12 * economic rights: Technische Universität Dresden (Germany) 13 * This file is part of TUD:OS and distributed under the terms of the 14 * GNU Lesser General Public License 2.1. 15 * Please see the COPYING-LGPL-2.1 file for details. 16 */ 17 18 #ifndef B64_EN_DECODE 19 #define B64_EN_DECODE 20 21 #include <l4/sys/compiler.h> 22 23 EXTERN_C_BEGIN 24 25 /** 26 * \defgroup l4util_internal Internal functions 27 * \ingroup l4util_api 28 */ 29 /*@{*/ 30 31 /*! 32 * \brief base-64-encode string \a infile 33 * \internal 34 * 35 * \param infile string to be encoded 36 * \param in_size length of \a infile 37 * \retval outfile the base-64-encoded representation of \a infile 38 * 39 * base-64-encode string \a infile adding padding as per spec 40 */ 41 L4_CV void base64_encode( const char *infile, unsigned int in_size, char **outfile); 42 43 /*! 44 * \brief decode base-64-encoded string \a infile 45 * \internal 46 * 47 * \param infile string to be decoded 48 * \param in_size length of \a infile 49 * \retval outfile the decoded representation of \a infile 50 * 51 * base-64-decode string \a infile discarding padding, line breaks and noise 52 */ 53 L4_CV void base64_decode(const char *infile, unsigned int in_size, char **outfile); 54 55 EXTERN_C_END 56 57 /*@}*/ 58 #endif //B64_EN_DECODE 59