Main Page | Modules | Namespace List | Data Structures | File List | Data Fields | Globals | Related Pages

/usr/src/rpmbuilder/BUILD/apr-util-APU_0_9_BRANCH/include/apr_base64.h

Go to the documentation of this file.
00001 /* Copyright 2000-2004 The Apache Software Foundation
00002  *
00003  * Licensed under the Apache License, Version 2.0 (the "License");
00004  * you may not use this file except in compliance with the License.
00005  * You may obtain a copy of the License at
00006  *
00007  *     http://www.apache.org/licenses/LICENSE-2.0
00008  *
00009  * Unless required by applicable law or agreed to in writing, software
00010  * distributed under the License is distributed on an "AS IS" BASIS,
00011  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00012  * See the License for the specific language governing permissions and
00013  * limitations under the License.
00014  * The apr_vsnprintf/apr_snprintf functions are based on, and used with the
00015  * permission of, the  SIO stdio-replacement strx_* functions by Panos
00016  * Tsirigotis <panos@alumni.cs.colorado.edu> for xinetd.
00017  */
00018 
00023 #ifndef APR_BASE64_H
00024 #define APR_BASE64_H
00025 
00026 #include "apu.h"
00027 #include "apr_general.h"
00028 
00029 #ifdef __cplusplus
00030 extern "C" {
00031 #endif
00032 
00039 /* Simple BASE64 encode/decode functions.
00040  * 
00041  * As we might encode binary strings, hence we require the length of
00042  * the incoming plain source. And return the length of what we decoded.
00043  *
00044  * The decoding function takes any non valid char (i.e. whitespace, \0
00045  * or anything non A-Z,0-9 etc as terminal.
00046  * 
00047  * plain strings/binary sequences are not assumed '\0' terminated. Encoded
00048  * strings are neither. But probably should.
00049  *
00050  */
00051 
00058 APU_DECLARE(int) apr_base64_encode_len(int len);
00059 
00067 APU_DECLARE(int) apr_base64_encode(char * coded_dst, const char *plain_src, 
00068                                  int len_plain_src);
00069 
00077 APU_DECLARE(int) apr_base64_encode_binary(char * coded_dst, 
00078                                         const unsigned char *plain_src,
00079                                         int len_plain_src);
00080 
00086 APU_DECLARE(int) apr_base64_decode_len(const char * coded_src);
00087 
00094 APU_DECLARE(int) apr_base64_decode(char * plain_dst, const char *coded_src);
00095 
00102 APU_DECLARE(int) apr_base64_decode_binary(unsigned char * plain_dst, 
00103                                         const char *coded_src);
00104 
00106 #ifdef __cplusplus
00107 }
00108 #endif
00109 
00110 #endif  /* !APR_BASE64_H */

Generated on Fri Apr 23 07:22:21 2004 for Apache Portable Runtime Utility Library by doxygen 1.3.4