Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > media > main-release > by-pkgid > bdcd72668be70f58bf0aa7c2102b0734 > files > 48

lib64apr-util-devel-1.2.12-4mdv2008.1.x86_64.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Apache Portable Runtime Utility Library: include/apr_base64.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.4 -->
<div class="tabs">
  <ul>
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="modules.html"><span>Modules</span></a></li>
    <li><a href="namespaces.html"><span>Namespaces</span></a></li>
    <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
    <li class="current"><a href="files.html"><span>Files</span></a></li>
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
  </ul>
</div>
<h1>include/apr_base64.h</h1><a href="apr__base64_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* Licensed to the Apache Software Foundation (ASF) under one or more</span>
<a name="l00002"></a>00002 <span class="comment"> * contributor license agreements.  See the NOTICE file distributed with</span>
<a name="l00003"></a>00003 <span class="comment"> * this work for additional information regarding copyright ownership.</span>
<a name="l00004"></a>00004 <span class="comment"> * The ASF licenses this file to You under the Apache License, Version 2.0</span>
<a name="l00005"></a>00005 <span class="comment"> * (the "License"); you may not use this file except in compliance with</span>
<a name="l00006"></a>00006 <span class="comment"> * the License.  You may obtain a copy of the License at</span>
<a name="l00007"></a>00007 <span class="comment"> *</span>
<a name="l00008"></a>00008 <span class="comment"> *     http://www.apache.org/licenses/LICENSE-2.0</span>
<a name="l00009"></a>00009 <span class="comment"> *</span>
<a name="l00010"></a>00010 <span class="comment"> * Unless required by applicable law or agreed to in writing, software</span>
<a name="l00011"></a>00011 <span class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</span>
<a name="l00012"></a>00012 <span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span>
<a name="l00013"></a>00013 <span class="comment"> * See the License for the specific language governing permissions and</span>
<a name="l00014"></a>00014 <span class="comment"> * limitations under the License.</span>
<a name="l00015"></a>00015 <span class="comment"> * The apr_vsnprintf/apr_snprintf functions are based on, and used with the</span>
<a name="l00016"></a>00016 <span class="comment"> * permission of, the  SIO stdio-replacement strx_* functions by Panos</span>
<a name="l00017"></a>00017 <span class="comment"> * Tsirigotis &lt;panos@alumni.cs.colorado.edu&gt; for xinetd.</span>
<a name="l00018"></a>00018 <span class="comment"> */</span>
<a name="l00019"></a>00019 
<a name="l00024"></a>00024 <span class="preprocessor">#ifndef APR_BASE64_H</span>
<a name="l00025"></a>00025 <span class="preprocessor"></span><span class="preprocessor">#define APR_BASE64_H</span>
<a name="l00026"></a>00026 <span class="preprocessor"></span>
<a name="l00027"></a>00027 <span class="preprocessor">#include "apu.h"</span>
<a name="l00028"></a>00028 <span class="preprocessor">#include "apr_general.h"</span>
<a name="l00029"></a>00029 
<a name="l00030"></a>00030 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l00031"></a>00031 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">"C"</span> {
<a name="l00032"></a>00032 <span class="preprocessor">#endif</span>
<a name="l00033"></a>00033 <span class="preprocessor"></span>
<a name="l00040"></a>00040 <span class="comment">/* Simple BASE64 encode/decode functions.</span>
<a name="l00041"></a>00041 <span class="comment"> * </span>
<a name="l00042"></a>00042 <span class="comment"> * As we might encode binary strings, hence we require the length of</span>
<a name="l00043"></a>00043 <span class="comment"> * the incoming plain source. And return the length of what we decoded.</span>
<a name="l00044"></a>00044 <span class="comment"> *</span>
<a name="l00045"></a>00045 <span class="comment"> * The decoding function takes any non valid char (i.e. whitespace, \0</span>
<a name="l00046"></a>00046 <span class="comment"> * or anything non A-Z,0-9 etc as terminal.</span>
<a name="l00047"></a>00047 <span class="comment"> * </span>
<a name="l00048"></a>00048 <span class="comment"> * plain strings/binary sequences are not assumed '\0' terminated. Encoded</span>
<a name="l00049"></a>00049 <span class="comment"> * strings are neither. But probably should.</span>
<a name="l00050"></a>00050 <span class="comment"> *</span>
<a name="l00051"></a>00051 <span class="comment"> */</span>
<a name="l00052"></a>00052 
<a name="l00059"></a>00059 <a class="code" href="group___a_p_r___util.html#g408498ed57031391c19bf360cc61733a">APU_DECLARE</a>(<span class="keywordtype">int</span>) <a class="code" href="group___a_p_r___util___base64.html#g5dad9df13a7018e3946a54c8d2c27ae9">apr_base64_encode_len</a>(<span class="keywordtype">int</span> len);
<a name="l00060"></a>00060 
<a name="l00068"></a>00068 <a class="code" href="group___a_p_r___util.html#g408498ed57031391c19bf360cc61733a">APU_DECLARE</a>(<span class="keywordtype">int</span>) <a class="code" href="group___a_p_r___util___base64.html#g6176124b05512773de40cc5e899058b9">apr_base64_encode</a>(<span class="keywordtype">char</span> * coded_dst, const <span class="keywordtype">char</span> *plain_src, 
<a name="l00069"></a>00069                                  <span class="keywordtype">int</span> len_plain_src);
<a name="l00070"></a>00070 
<a name="l00078"></a>00078 <a class="code" href="group___a_p_r___util.html#g408498ed57031391c19bf360cc61733a">APU_DECLARE</a>(<span class="keywordtype">int</span>) <a class="code" href="group___a_p_r___util___base64.html#ge7480ce6b723e71cf91583217d96f1d7">apr_base64_encode_binary</a>(<span class="keywordtype">char</span> * coded_dst, 
<a name="l00079"></a>00079                                         const <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *plain_src,
<a name="l00080"></a>00080                                         <span class="keywordtype">int</span> len_plain_src);
<a name="l00081"></a>00081 
<a name="l00088"></a>00088 <a class="code" href="group___a_p_r___util.html#g408498ed57031391c19bf360cc61733a">APU_DECLARE</a>(<span class="keywordtype">int</span>) <a class="code" href="group___a_p_r___util___base64.html#gd1ba714a6708376e6a21722a40a698a2">apr_base64_decode_len</a>(const <span class="keywordtype">char</span> * coded_src);
<a name="l00089"></a>00089 
<a name="l00096"></a>00096 <a class="code" href="group___a_p_r___util.html#g408498ed57031391c19bf360cc61733a">APU_DECLARE</a>(<span class="keywordtype">int</span>) <a class="code" href="group___a_p_r___util___base64.html#g1f717903883e7405c2a0d0ec5814f865">apr_base64_decode</a>(<span class="keywordtype">char</span> * plain_dst, const <span class="keywordtype">char</span> *coded_src);
<a name="l00097"></a>00097 
<a name="l00104"></a>00104 <a class="code" href="group___a_p_r___util.html#g408498ed57031391c19bf360cc61733a">APU_DECLARE</a>(<span class="keywordtype">int</span>) <a class="code" href="group___a_p_r___util___base64.html#g3d8f1517351d8b7a18b8396642b98975">apr_base64_decode_binary</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> * plain_dst, 
<a name="l00105"></a>00105                                         const <span class="keywordtype">char</span> *coded_src);
<a name="l00106"></a>00106 
<a name="l00108"></a>00108 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l00109"></a>00109 <span class="preprocessor"></span>}
<a name="l00110"></a>00110 <span class="preprocessor">#endif</span>
<a name="l00111"></a>00111 <span class="preprocessor"></span>
<a name="l00112"></a>00112 <span class="preprocessor">#endif  </span><span class="comment">/* !APR_BASE64_H */</span>
</pre></div><hr size="1"><address style="text-align: right;"><small>Generated on Thu Jan 24 02:22:55 2008 for Apache Portable Runtime Utility Library by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.4 </small></address>
</body>
</html>