base64.h

Go to the documentation of this file.
00001 
00003 
00004 //
00005 // Copyright (c) 2004-2007 University of Southern California
00006 // Rob Peters <rjpeters at usc dot edu>
00007 //
00008 // created: Fri Oct  8 13:44:03 2004
00009 // commit: $Id: base64.h 10065 2007-04-12 05:54:56Z rjpeters $
00010 // $HeadURL: file:///lab/rjpeters/svnrepo/code/trunk/groovx/src/rutz/base64.h $
00011 //
00012 // --------------------------------------------------------------------
00013 //
00014 // This file is part of GroovX.
00015 //   [http://ilab.usc.edu/rjpeters/groovx/]
00016 //
00017 // GroovX is free software; you can redistribute it and/or modify it
00018 // under the terms of the GNU General Public License as published by
00019 // the Free Software Foundation; either version 2 of the License, or
00020 // (at your option) any later version.
00021 //
00022 // GroovX is distributed in the hope that it will be useful, but
00023 // WITHOUT ANY WARRANTY; without even the implied warranty of
00024 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00025 // General Public License for more details.
00026 //
00027 // You should have received a copy of the GNU General Public License
00028 // along with GroovX; if not, write to the Free Software Foundation,
00029 // Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
00030 //
00032 
00033 #ifndef GROOVX_RUTZ_BASE64_H_UTC20050626084019_DEFINED
00034 #define GROOVX_RUTZ_BASE64_H_UTC20050626084019_DEFINED
00035 
00036 namespace rutz
00037 {
00038   class byte_array;
00039 
00040   void base64_encode(const unsigned char* src,
00041                      unsigned int src_len,
00042                      rutz::byte_array& dst,
00043                      unsigned int line_width = 0);
00044 
00045   void base64_encode_string(const char* str,
00046                             rutz::byte_array& dst,
00047                             unsigned int line_width = 0);
00048 
00049   void base64_encode_file(const char* src_filename,
00050                           rutz::byte_array& dst,
00051                           unsigned int line_width = 0);
00052 
00053   void base64_decode(const char* src,
00054                      unsigned int in_len,
00055                      rutz::byte_array& dst);
00056 
00057   void base64_decode(const rutz::byte_array& src,
00058                      rutz::byte_array& dst);
00059 }
00060 
00061 static const char __attribute__((used)) vcid_groovx_rutz_base64_h_utc20050626084019[] = "$Id: base64.h 10065 2007-04-12 05:54:56Z rjpeters $ $HeadURL: file:
00062 #endif // !GROOVX_RUTZ_BASE64_H_UTC20050626084019_DEFINED

The software described here is Copyright (c) 1998-2005, Rob Peters.
This page was generated Wed Dec 3 06:49:40 2008 by Doxygen version 1.5.5.