DragonNest/Common/SVNLib/doc/svn__base64_8h-source.html
2024-12-19 09:48:26 +08:00

120 lines
11 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Subversion: svn_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.6 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
<li><a href="modules.html"><span>Modules</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>
<form action="search.php" method="get">
<table cellspacing="0" cellpadding="0" border="0">
<tr>
<td><label>&nbsp;<u>S</u>earch&nbsp;for&nbsp;</label></td>
<td><input type="text" name="query" value="" size="20" accesskey="s"/></td>
</tr>
</table>
</form>
</li>
</ul>
</div>
<h1>svn_base64.h</h1><a href="svn__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">/**</span>
<a name="l00002"></a>00002 <span class="comment"> * @copyright</span>
<a name="l00003"></a>00003 <span class="comment"> * ====================================================================</span>
<a name="l00004"></a>00004 <span class="comment"> * Copyright (c) 2000-2004 CollabNet. All rights reserved.</span>
<a name="l00005"></a>00005 <span class="comment"> *</span>
<a name="l00006"></a>00006 <span class="comment"> * This software is licensed as described in the file COPYING, which</span>
<a name="l00007"></a>00007 <span class="comment"> * you should have received as part of this distribution. The terms</span>
<a name="l00008"></a>00008 <span class="comment"> * are also available at http://subversion.tigris.org/license-1.html.</span>
<a name="l00009"></a>00009 <span class="comment"> * If newer versions of this license are posted there, you may use a</span>
<a name="l00010"></a>00010 <span class="comment"> * newer version instead, at your option.</span>
<a name="l00011"></a>00011 <span class="comment"> *</span>
<a name="l00012"></a>00012 <span class="comment"> * This software consists of voluntary contributions made by many</span>
<a name="l00013"></a>00013 <span class="comment"> * individuals. For exact contribution history, see the revision</span>
<a name="l00014"></a>00014 <span class="comment"> * history and logs, available at http://subversion.tigris.org/.</span>
<a name="l00015"></a>00015 <span class="comment"> * ====================================================================</span>
<a name="l00016"></a>00016 <span class="comment"> * @endcopyright</span>
<a name="l00017"></a>00017 <span class="comment"> *</span>
<a name="l00018"></a>00018 <span class="comment"> * @file svn_base64.h</span>
<a name="l00019"></a>00019 <span class="comment"> * @brief Base64 encoding and decoding functions</span>
<a name="l00020"></a>00020 <span class="comment"> */</span>
<a name="l00021"></a>00021
<a name="l00022"></a>00022 <span class="preprocessor">#ifndef SVN_BASE64_H</span>
<a name="l00023"></a>00023 <span class="preprocessor"></span><span class="preprocessor">#define SVN_BASE64_H</span>
<a name="l00024"></a>00024 <span class="preprocessor"></span>
<a name="l00025"></a>00025 <span class="preprocessor">#include &lt;apr_md5.h&gt;</span>
<a name="l00026"></a>00026
<a name="l00027"></a>00027 <span class="preprocessor">#include "<a class="code" href="svn__io_8h.html" title="General file I/O for Subversion.">svn_io.h</a>"</span>
<a name="l00028"></a>00028
<a name="l00029"></a>00029 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l00030"></a>00030 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">"C"</span> {
<a name="l00031"></a>00031 <span class="preprocessor">#endif </span><span class="comment">/* __cplusplus */</span>
<a name="l00032"></a>00032 <span class="comment"></span>
<a name="l00033"></a>00033 <span class="comment">/**</span>
<a name="l00034"></a>00034 <span class="comment"> *</span>
<a name="l00035"></a>00035 <span class="comment"> *</span>
<a name="l00036"></a>00036 <span class="comment"> * @defgroup base64 Base64 encoding/decoding functions</span>
<a name="l00037"></a>00037 <span class="comment"> *</span>
<a name="l00038"></a>00038 <span class="comment"> * @{</span>
<a name="l00039"></a>00039 <span class="comment"> */</span>
<a name="l00040"></a>00040 <span class="comment"></span>
<a name="l00041"></a>00041 <span class="comment">/** Return a writable generic stream which will encode binary data in</span>
<a name="l00042"></a>00042 <span class="comment"> * base64 format and write the encoded data to @c output. Be sure to</span>
<a name="l00043"></a>00043 <span class="comment"> * close the stream when done writing in order to squeeze out the last</span>
<a name="l00044"></a>00044 <span class="comment"> * bit of encoded data. The stream is allocated in @c pool.</span>
<a name="l00045"></a>00045 <span class="comment"> */</span>
<a name="l00046"></a>00046 <a class="code" href="group__svn__io__byte__streams.html#g06d6291c397e63f895deb92a2c14e6af" title="An abstract stream of bytes--either incoming or outgoing or both.">svn_stream_t</a> *<a class="code" href="group__base64.html#gb7a8b73c6a2e3c99607bf49f3edee327" title="Return a writable generic stream which will encode binary data in base64 format and...">svn_base64_encode</a>(<a class="code" href="group__svn__io__byte__streams.html#g06d6291c397e63f895deb92a2c14e6af" title="An abstract stream of bytes--either incoming or outgoing or both.">svn_stream_t</a> *output, apr_pool_t *pool);
<a name="l00047"></a>00047 <span class="comment"></span>
<a name="l00048"></a>00048 <span class="comment">/** Return a writable generic stream which will decode base64-encoded</span>
<a name="l00049"></a>00049 <span class="comment"> * data and write the decoded data to @c output. The stream is allocated</span>
<a name="l00050"></a>00050 <span class="comment"> * in @c pool.</span>
<a name="l00051"></a>00051 <span class="comment"> */</span>
<a name="l00052"></a>00052 <a class="code" href="group__svn__io__byte__streams.html#g06d6291c397e63f895deb92a2c14e6af" title="An abstract stream of bytes--either incoming or outgoing or both.">svn_stream_t</a> *<a class="code" href="group__base64.html#g66bbda8102beff94920d7de27eaa9bf9" title="Return a writable generic stream which will decode base64-encoded data and write...">svn_base64_decode</a>(<a class="code" href="group__svn__io__byte__streams.html#g06d6291c397e63f895deb92a2c14e6af" title="An abstract stream of bytes--either incoming or outgoing or both.">svn_stream_t</a> *output, apr_pool_t *pool);
<a name="l00053"></a>00053
<a name="l00054"></a>00054 <span class="comment"></span>
<a name="l00055"></a>00055 <span class="comment">/** Encode an @c svn_stringbuf_t into base64.</span>
<a name="l00056"></a>00056 <span class="comment"> *</span>
<a name="l00057"></a>00057 <span class="comment"> * A simple interface for encoding base64 data assuming we have all of</span>
<a name="l00058"></a>00058 <span class="comment"> * it present at once. The returned string will be allocated from @c pool.</span>
<a name="l00059"></a>00059 <span class="comment"> */</span>
<a name="l00060"></a>00060 <span class="keyword">const</span> <a class="code" href="structsvn__string__t.html" title="A simple counted string.">svn_string_t</a> *<a class="code" href="group__base64.html#gce1091f9afa92d9d15b938f504010df1" title="Encode an svn_stringbuf_t into base64.">svn_base64_encode_string</a>(<span class="keyword">const</span> <a class="code" href="structsvn__string__t.html" title="A simple counted string.">svn_string_t</a> *str,
<a name="l00061"></a>00061 apr_pool_t *pool);
<a name="l00062"></a>00062 <span class="comment"></span>
<a name="l00063"></a>00063 <span class="comment">/** Decode an @c svn_stringbuf_t from base64.</span>
<a name="l00064"></a>00064 <span class="comment"> *</span>
<a name="l00065"></a>00065 <span class="comment"> * A simple interface for decoding base64 data assuming we have all of</span>
<a name="l00066"></a>00066 <span class="comment"> * it present at once. The returned string will be allocated from @c pool.</span>
<a name="l00067"></a>00067 <span class="comment"> */</span>
<a name="l00068"></a>00068 <span class="keyword">const</span> <a class="code" href="structsvn__string__t.html" title="A simple counted string.">svn_string_t</a> *<a class="code" href="group__base64.html#g47d6b20f4617ff5172f0d758ee73242c" title="Decode an svn_stringbuf_t from base64.">svn_base64_decode_string</a>(<span class="keyword">const</span> <a class="code" href="structsvn__string__t.html" title="A simple counted string.">svn_string_t</a> *str,
<a name="l00069"></a>00069 apr_pool_t *pool);
<a name="l00070"></a>00070
<a name="l00071"></a>00071 <span class="comment"></span>
<a name="l00072"></a>00072 <span class="comment">/** Return a base64-encoded checksum for finalized @c digest.</span>
<a name="l00073"></a>00073 <span class="comment"> *</span>
<a name="l00074"></a>00074 <span class="comment"> * @c digest contains @c APR_MD5_DIGESTSIZE bytes of finalized data.</span>
<a name="l00075"></a>00075 <span class="comment"> * Allocate the returned checksum in @c pool.</span>
<a name="l00076"></a>00076 <span class="comment"> */</span>
<a name="l00077"></a>00077 <a class="code" href="structsvn__stringbuf__t.html" title="A buffered string, capable of appending without an allocation and copy for each append...">svn_stringbuf_t</a> *<a class="code" href="group__base64.html#gc3b6e28043e7320cdb3721ff18a89be0" title="Return a base64-encoded checksum for finalized digest.">svn_base64_from_md5</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> digest[],
<a name="l00078"></a>00078 apr_pool_t *pool);
<a name="l00079"></a>00079
<a name="l00080"></a>00080 <span class="comment"></span>
<a name="l00081"></a>00081 <span class="comment">/** @} end group: Base64 encoding/decoding functions */</span>
<a name="l00082"></a>00082
<a name="l00083"></a>00083 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l00084"></a>00084 <span class="preprocessor"></span>}
<a name="l00085"></a>00085 <span class="preprocessor">#endif </span><span class="comment">/* __cplusplus */</span>
<a name="l00086"></a>00086
<a name="l00087"></a>00087 <span class="preprocessor">#endif </span><span class="comment">/* SVN_BASE64_H */</span>
</pre></div></div>
<hr size="1"><address style="text-align: right;"><small>Generated on Fri Oct 24 16:18:24 2008 for Subversion by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address>
</body>
</html>