Sophie

Sophie

distrib > Fedora > 16 > i386 > by-pkgid > c9881146c6f577eab6c4234fd92f4c52 > files > 23

ortp-devel-0.20.0-2.fc16.i686.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>oRTP: src/b64.c File Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">oRTP
   &#160;<span id="projectnumber">0.20.0</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#define-members">Defines</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">src/b64.c File Reference</div>  </div>
</div>
<div class="contents">
<div class="textblock"><code>#include &quot;ortp/b64.h&quot;</code><br/>
<code>#include &lt;assert.h&gt;</code><br/>
<code>#include &lt;string.h&gt;</code><br/>
<code>#include &quot;ortp/port.h&quot;</code><br/>
</div><div class="textblock"><div class="dynheader">
Include dependency graph for b64.c:</div>
<div class="dyncontent">
<div class="center"><img src="b64_8c__incl.png" border="0" usemap="#src_2b64_8c" alt=""/></div>
<map name="src_2b64_8c" id="src_2b64_8c">
<area shape="rect" id="node3" href="b64_8h_source.html" title="ortp/b64.h" alt="" coords="4,80,83,107"/><area shape="rect" id="node11" href="port_8h_source.html" title="ortp/port.h" alt="" coords="658,80,739,107"/></map>
</div>
</div><table class="memberdecls">
<tr><td colspan="2"><h2><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structb64ErrorString__t__.html">b64ErrorString_t_</a></td></tr>
<tr><td colspan="2"><h2><a name="define-members"></a>
Defines</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="abb02ef9c156eb61724e43f329a04c9bd"></a><!-- doxytag: member="b64.c::B64_VER_C_B64_MAJOR" ref="abb02ef9c156eb61724e43f329a04c9bd" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>B64_VER_C_B64_MAJOR</b>&#160;&#160;&#160;1</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3942b4aad9c6babe73035f988ee8f897"></a><!-- doxytag: member="b64.c::B64_VER_C_B64_MINOR" ref="a3942b4aad9c6babe73035f988ee8f897" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>B64_VER_C_B64_MINOR</b>&#160;&#160;&#160;2</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad18448a1555a2b386ca78978eab02526"></a><!-- doxytag: member="b64.c::B64_VER_C_B64_REVISION" ref="ad18448a1555a2b386ca78978eab02526" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>B64_VER_C_B64_REVISION</b>&#160;&#160;&#160;3</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2e70643ce49a47b41b640cab45e705e3"></a><!-- doxytag: member="b64.c::B64_VER_C_B64_EDIT" ref="a2e70643ce49a47b41b640cab45e705e3" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>B64_VER_C_B64_EDIT</b>&#160;&#160;&#160;17</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad7a5728d96878819b0dacf5554bb4a6e"></a><!-- doxytag: member="b64.c::NUM_PLAIN_DATA_BYTES" ref="ad7a5728d96878819b0dacf5554bb4a6e" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>NUM_PLAIN_DATA_BYTES</b>&#160;&#160;&#160;(3)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab04dac0a4446dc3fc45f4c42c5be2103"></a><!-- doxytag: member="b64.c::NUM_ENCODED_DATA_BYTES" ref="ab04dac0a4446dc3fc45f4c42c5be2103" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>NUM_ENCODED_DATA_BYTES</b>&#160;&#160;&#160;(4)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0bf05373027b4f63e6a275eb4c3da931"></a><!-- doxytag: member="b64.c::NUM_ELEMENTS" ref="a0bf05373027b4f63e6a275eb4c3da931" args="(x)" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>NUM_ELEMENTS</b>(x)&#160;&#160;&#160;(sizeof(x) / sizeof(x[0]))</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><b>SEVERITY_STR_DECL</b>(rc, desc)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><b>SEVERITY_STR_ENTRY</b>(rc)</td></tr>
<tr><td colspan="2"><h2><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aac1b6d81700849f88a1acf5d994eaa0b"></a><!-- doxytag: member="b64.c::b64ErrorString_t_" ref="aac1b6d81700849f88a1acf5d994eaa0b" args="" -->
typedef struct <a class="el" href="structb64ErrorString__t__.html">b64ErrorString_t_</a>&#160;</td><td class="memItemRight" valign="bottom"><b>b64ErrorString_t_</b></td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="b64_8c.html#aa518340c8e76af0cf0753c15bebfc2af">b64_encode</a> (void const *src, size_t srcSize, char *dest, size_t destLen)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Encodes a block of binary data into Base-64.  <a href="#aa518340c8e76af0cf0753c15bebfc2af"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="b64_8c.html#ab08b80124c4db4bf423feff5f7ffa5f2">b64_encode2</a> (void const *src, size_t srcSize, char *dest, size_t destLen, unsigned flags, int lineLen, B64_RC *rc)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Encodes a block of binary data into Base-64.  <a href="#ab08b80124c4db4bf423feff5f7ffa5f2"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="b64_8c.html#af0a580e1694f2addb2fec740214f959a">b64_decode</a> (char const *src, size_t srcLen, void *dest, size_t destSize)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Decodes a sequence of Base-64 into a block of binary data.  <a href="#af0a580e1694f2addb2fec740214f959a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="b64_8c.html#a50a93e4f6a922c5314a9cb50befc2d13">b64_decode2</a> (char const *src, size_t srcLen, void *dest, size_t destSize, unsigned flags, char const **badChar, B64_RC *rc)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Decodes a sequence of Base-64 into a block of binary data.  <a href="#a50a93e4f6a922c5314a9cb50befc2d13"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">char const *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="b64_8c.html#a84adc01b9c5028eee501d2fb2bef9a11">b64_getErrorString</a> (B64_RC code)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the textual description of the error.  <a href="#a84adc01b9c5028eee501d2fb2bef9a11"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="b64_8c.html#a48c61d4785f8b1f8122a5a9f778a9f20">b64_getErrorStringLength</a> (B64_RC code)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the length of the textual description of the error.  <a href="#a48c61d4785f8b1f8122a5a9f778a9f20"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Implementation file for the b64 library </p>
</div><hr/><h2>Define Documentation</h2>
<a class="anchor" id="aede330f4e9a5a2b3c2995f7afc2b4546"></a><!-- doxytag: member="b64.c::SEVERITY_STR_DECL" ref="aede330f4e9a5a2b3c2995f7afc2b4546" args="(rc, desc)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SEVERITY_STR_DECL</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">rc, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">desc&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<b>Value:</b><div class="fragment"><pre class="fragment">\
    static <span class="keyword">const</span> <span class="keywordtype">char</span>               s_str##rc[] =   desc;                                   \
    static <span class="keyword">const</span> <a class="code" href="structb64ErrorString__t__.html">b64ErrorString_t_</a>  s_rct##rc = { rc, s_str##rc, NUM_ELEMENTS(s_str##rc) - 1 }
</pre></div>
</div>
</div>
<a class="anchor" id="a8af0337317f4ae55ed9c30c352e7416b"></a><!-- doxytag: member="b64.c::SEVERITY_STR_ENTRY" ref="a8af0337317f4ae55ed9c30c352e7416b" args="(rc)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SEVERITY_STR_ENTRY</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">rc</td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<b>Value:</b><div class="fragment"><pre class="fragment">\
    &amp;s_rct##rc
</pre></div>
</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="af0a580e1694f2addb2fec740214f959a"></a><!-- doxytag: member="b64.c::b64_decode" ref="af0a580e1694f2addb2fec740214f959a" args="(char const *src, size_t srcLen, void *dest, size_t destSize)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_t b64_decode </td>
          <td>(</td>
          <td class="paramtype">char const *&#160;</td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>srcLen</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>dest</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>destSize</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Decodes a sequence of Base-64 into a block of binary data. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">src</td><td>Pointer to the Base-64 block to be decoded. May not be NULL, except when <code>dest</code> is NULL, in which case it is ignored. If <code>dest</code> is NULL, and <code>src</code> is <b>not</b> NULL, then the returned value is calculated exactly, otherwise a value is returned that is guaranteed to be large enough to hold the decoded block.</td></tr>
    <tr><td class="paramname">srcLen</td><td>Length of block to be encoded. Must be an integral of 4, the Base-64 encoding quantum, otherwise the Base-64 block is assumed to be invalid </td></tr>
    <tr><td class="paramname">dest</td><td>Pointer to the buffer into which the result is to be written. May be NULL, in which case the function returns the required length </td></tr>
    <tr><td class="paramname">destSize</td><td>Length of the buffer into which the result is to be written. Must be at least as large as that indicated by the return value from <code>b64_decode(src, srcSize, NULL, 0)</code>, even in the case where the encoded form contains a number of characters that will be ignored, resulting in a lower total length of converted form.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>0 if the size of the buffer was insufficient, or the length of the converted buffer was longer than <code>destSize</code> </dd></dl>
<dl class="note"><dt><b>Note:</b></dt><dd>The function returns the required length if <code>dest</code> is NULL. The returned size might be larger than the actual required size, but will never be smaller.</dd>
<dd>
<a class="anchor" id="anchor__4_characters"></a>The behaviour of both <a class="el" href="b64_8c.html#ab08b80124c4db4bf423feff5f7ffa5f2">b64_encode2()</a> and <a class="el" href="b64_8c.html#a50a93e4f6a922c5314a9cb50befc2d13">b64_decode2()</a> are undefined if the line length is not a multiple of 4.</dd>
<dd>
Threading: The function is fully re-entrant.</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd>b64::decode() </dd></dl>

</div>
</div>
<a class="anchor" id="a50a93e4f6a922c5314a9cb50befc2d13"></a><!-- doxytag: member="b64.c::b64_decode2" ref="a50a93e4f6a922c5314a9cb50befc2d13" args="(char const *src, size_t srcLen, void *dest, size_t destSize, unsigned flags, char const **badChar, B64_RC *rc)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_t b64_decode2 </td>
          <td>(</td>
          <td class="paramtype">char const *&#160;</td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>srcLen</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>dest</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>destSize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned&#160;</td>
          <td class="paramname"><em>flags</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char const **&#160;</td>
          <td class="paramname"><em>badChar</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">B64_RC *&#160;</td>
          <td class="paramname"><em>rc</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Decodes a sequence of Base-64 into a block of binary data. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">src</td><td>Pointer to the Base-64 block to be decoded. May not be NULL, except when <code>dest</code> is NULL, in which case it is ignored. If <code>dest</code> is NULL, and <code>src</code> is <b>not</b> NULL, then the returned value is calculated exactly, otherwise a value is returned that is guaranteed to be large enough to hold the decoded block.</td></tr>
    <tr><td class="paramname">srcLen</td><td>Length of block to be encoded. Must be an integral of 4, the Base-64 encoding quantum, otherwise the Base-64 block is assumed to be invalid </td></tr>
    <tr><td class="paramname">dest</td><td>Pointer to the buffer into which the result is to be written. May be NULL, in which case the function returns the required length </td></tr>
    <tr><td class="paramname">destSize</td><td>Length of the buffer into which the result is to be written. Must be at least as large as that indicated by the return value from <code>b64_decode(src, srcSize, NULL, 0)</code>, even in the case where the encoded form contains a number of characters that will be ignored, resulting in a lower total length of converted form. </td></tr>
    <tr><td class="paramname">flags</td><td>A combination of the B64_FLAGS enumeration, that moderate the behaviour of the function. </td></tr>
    <tr><td class="paramname">rc</td><td>The return code representing the status of the operation. May be NULL. </td></tr>
    <tr><td class="paramname">badChar</td><td>If the flags parameter does not contain B64_F_STOP_ON_NOTHING, this parameter specifies the address of a pointer that will be set to point to any character in the sequence that stops the parsing, as dictated by the flags parameter. May be NULL.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>0 if the size of the buffer was insufficient, or the length of the converted buffer was longer than <code>destSize</code>, or a bad character stopped parsing.</dd></dl>
<dl class="note"><dt><b>Note:</b></dt><dd>The function returns the required length if <code>dest</code> is NULL. The returned size might be larger than the actual required size, but will never be smaller.</dd>
<dd>
The behaviour of both <a class="el" href="b64_8c.html#ab08b80124c4db4bf423feff5f7ffa5f2">b64_encode2()</a> and <a class="el" href="b64_8c.html#a50a93e4f6a922c5314a9cb50befc2d13">b64_decode2()</a> are undefined if the line length is not a multiple of 4.</dd>
<dd>
Threading: The function is fully re-entrant.</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd>b64::decode() </dd></dl>

</div>
</div>
<a class="anchor" id="aa518340c8e76af0cf0753c15bebfc2af"></a><!-- doxytag: member="b64.c::b64_encode" ref="aa518340c8e76af0cf0753c15bebfc2af" args="(void const *src, size_t srcSize, char *dest, size_t destLen)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_t b64_encode </td>
          <td>(</td>
          <td class="paramtype">void const *&#160;</td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>srcSize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>dest</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>destLen</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Encodes a block of binary data into Base-64. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">src</td><td>Pointer to the block to be encoded. May not be NULL, except when <code>dest</code> is NULL, in which case it is ignored. </td></tr>
    <tr><td class="paramname">srcSize</td><td>Length of block to be encoded </td></tr>
    <tr><td class="paramname">dest</td><td>Pointer to the buffer into which the result is to be written. May be NULL, in which case the function returns the required length </td></tr>
    <tr><td class="paramname">destLen</td><td>Length of the buffer into which the result is to be written. Must be at least as large as that indicated by the return value from <a class="el" href="b64_8c.html#aa518340c8e76af0cf0753c15bebfc2af">b64_encode(NULL, srcSize, NULL, 0)</a>.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>0 if the size of the buffer was insufficient, or the length of the converted buffer was longer than <code>destLen</code> </dd></dl>
<dl class="note"><dt><b>Note:</b></dt><dd>The function returns the required length if <code>dest</code> is NULL</dd>
<dd>
The function returns the required length if <code>dest</code> is NULL. The returned size might be larger than the actual required size, but will never be smaller.</dd>
<dd>
Threading: The function is fully re-entrant.</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd>b64::encode() </dd></dl>

</div>
</div>
<a class="anchor" id="ab08b80124c4db4bf423feff5f7ffa5f2"></a><!-- doxytag: member="b64.c::b64_encode2" ref="ab08b80124c4db4bf423feff5f7ffa5f2" args="(void const *src, size_t srcSize, char *dest, size_t destLen, unsigned flags, int lineLen, B64_RC *rc)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_t b64_encode2 </td>
          <td>(</td>
          <td class="paramtype">void const *&#160;</td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>srcSize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>dest</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>destLen</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned&#160;</td>
          <td class="paramname"><em>flags</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>lineLen</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">B64_RC *&#160;</td>
          <td class="paramname"><em>rc</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Encodes a block of binary data into Base-64. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">src</td><td>Pointer to the block to be encoded. May not be NULL, except when <code>dest</code> is NULL, in which case it is ignored. </td></tr>
    <tr><td class="paramname">srcSize</td><td>Length of block to be encoded </td></tr>
    <tr><td class="paramname">dest</td><td>Pointer to the buffer into which the result is to be written. May be NULL, in which case the function returns the required length </td></tr>
    <tr><td class="paramname">destLen</td><td>Length of the buffer into which the result is to be written. Must be at least as large as that indicated by the return value from <a class="el" href="b64_8c.html#ab08b80124c4db4bf423feff5f7ffa5f2">b64_encode2(NULL, srcSize, NULL, 0, flags, lineLen, rc)</a>. </td></tr>
    <tr><td class="paramname">flags</td><td>A combination of the B64_FLAGS enumeration, that moderate the behaviour of the function </td></tr>
    <tr><td class="paramname">lineLen</td><td>If the flags parameter contains B64_F_LINE_LEN_USE_PARAM, then this parameter represents the length of the lines into which the encoded form is split, with a hard line break ('\r\n'). If this value is 0, then the line is not split. If it is &lt;0, then the RFC-1113 recommended line length of 64 is used </td></tr>
    <tr><td class="paramname">rc</td><td>The return code representing the status of the operation. May be NULL.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>0 if the size of the buffer was insufficient, or the length of the converted buffer was longer than <code>destLen</code> </dd></dl>
<dl class="note"><dt><b>Note:</b></dt><dd>The function returns the required length if <code>dest</code> is NULL. The returned size might be larger than the actual required size, but will never be smaller.</dd>
<dd>
Threading: The function is fully re-entrant.</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd>b64::encode() </dd></dl>

</div>
</div>
<a class="anchor" id="a84adc01b9c5028eee501d2fb2bef9a11"></a><!-- doxytag: member="b64.c::b64_getErrorString" ref="a84adc01b9c5028eee501d2fb2bef9a11" args="(B64_RC code)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char const* b64_getErrorString </td>
          <td>(</td>
          <td class="paramtype">B64_RC&#160;</td>
          <td class="paramname"><em>code</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the textual description of the error. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">code</td><td>The <a class="el" href="">error code</a> </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a48c61d4785f8b1f8122a5a9f778a9f20"></a><!-- doxytag: member="b64.c::b64_getErrorStringLength" ref="a48c61d4785f8b1f8122a5a9f778a9f20" args="(B64_RC code)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_t b64_getErrorStringLength </td>
          <td>(</td>
          <td class="paramtype">B64_RC&#160;</td>
          <td class="paramname"><em>code</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the length of the textual description of the error. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="b64_8c.html#a84adc01b9c5028eee501d2fb2bef9a11" title="Returns the textual description of the error.">b64_getErrorString()</a></dd></dl>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">code</td><td>The <a class="el" href="">error code</a> </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div>


<hr class="footer"/><address class="footer"><small>
Generated on Sat Feb 25 2012 10:01:30 for oRTP by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.5
</small></address>

</body>
</html>