1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>KLone: codec_t - codec funtions</title>
<link href="kl.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3.9.1 -->
<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="annotated.html">Data Structures</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Data Fields</a> | <a class="qindex" href="globals.html">Globals</a></div>
<h1>codec_t - codec funtions</h1><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Typedefs</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef codec_gzip_s </td><td class="memItemRight" valign="bottom"><a class="el" href="group__codec__t.html#ga0">codec_gzip_t</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef codec_null_s </td><td class="memItemRight" valign="bottom"><a class="el" href="group__codec__t.html#ga1">codec_null_t</a></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__codec__t.html#ga2">codec_cipher_create</a> (int op, const EVP_CIPHER *cipher, unsigned char *key, unsigned char *iv, <a class="el" href="structcodec__s.html">codec_t</a> **pcc)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Create a cipher <code>codec_t</code> object. <a href="#ga2"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__codec__t.html#ga3">codec_free</a> (<a class="el" href="structcodec__s.html">codec_t</a> *codec)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Dispose all the resources allocated to the supplied codec. <a href="#ga3"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__codec__t.html#ga7">codec_gzip_create</a> (int op, <a class="el" href="structcodec__s.html">codec_t</a> **piz)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Create a cipher <code>codec_t</code> object. <a href="#ga7"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__codec__t.html#ga11">codec_null_create</a> (<a class="el" href="structcodec__s.html">codec_t</a> **pcn)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Create a cipher <code>codec_t</code> object. <a href="#ga11"></a><br></td></tr>
</table>
<hr><h2>Typedef Documentation</h2>
<a class="anchor" name="ga0" doxytag="gzip.c::codec_gzip_t"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">typedef struct codec_gzip_s <a class="el" href="group__codec__t.html#ga0">codec_gzip_t</a> </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
<p>
Definition at line <a class="el" href="gzip_8c-source.html#l00035">35</a> of file <a class="el" href="gzip_8c-source.html">gzip.c</a>.
<p>
Referenced by <a class="el" href="gzip_8c-source.html#l00142">codec_gzip_create()</a>. </td>
</tr>
</table>
<a class="anchor" name="ga1" doxytag="null.c::codec_null_t"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">typedef struct codec_null_s <a class="el" href="group__codec__t.html#ga1">codec_null_t</a> </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
<p>
Definition at line <a class="el" href="null_8c-source.html#l00027">27</a> of file <a class="el" href="null_8c-source.html">null.c</a>.
<p>
Referenced by <a class="el" href="null_8c-source.html#l00074">codec_null_create()</a>. </td>
</tr>
</table>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="ga2" doxytag="cipher.c::codec_cipher_create"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">int codec_cipher_create </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">int </td>
<td class="mdname" nowrap> <em>op</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>const EVP_CIPHER * </td>
<td class="mdname" nowrap> <em>cipher</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>unsigned char * </td>
<td class="mdname" nowrap> <em>key</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>unsigned char * </td>
<td class="mdname" nowrap> <em>iv</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap><a class="el" href="structcodec__s.html">codec_t</a> ** </td>
<td class="mdname" nowrap> <em>pcc</em></td>
</tr>
<tr>
<td class="md"></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
Create a cipher <code>codec_t</code> object at <code>*pcc</code> suitable for encryption or decryption (depending on <code>op</code>). The <code>cipher</code>, <code>key</code> and <code>iv</code> parameters hold the algorithm, key and initialisation vector respectively, used for the data transforms.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>op</em> </td><td>one of <code>CIPHER_ENCRYPT</code> or <code>CIPHER_DECRYPT</code> </td></tr>
<tr><td valign="top"></td><td valign="top"><em>cipher</em> </td><td>an OpenSSL <code>EVP_CIPHER</code> object </td></tr>
<tr><td valign="top"></td><td valign="top"><em>key</em> </td><td>the encryption/decryption key </td></tr>
<tr><td valign="top"></td><td valign="top"><em>iv</em> </td><td>the initialisation vector </td></tr>
<tr><td valign="top"></td><td valign="top"><em>pcc</em> </td><td>the created codec as a value-result arguement</td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd><code>0</code> on success, <code>~0</code> otherwise </dd></dl>
<p>
Definition at line <a class="el" href="cipher_8c-source.html#l00172">172</a> of file <a class="el" href="cipher_8c-source.html">cipher.c</a>.
<p>
References <a class="el" href="codec_8h-source.html#l00045">codec_s::cbuf</a>, <a class="el" href="cipher_8c.html#a9a3">CODEC_CIPHER_MAX_INPUT</a>, <a class="el" href="cipher_8c-source.html#l00035">codec_cipher_t</a>, <a class="el" href="codec_8h.html#a4">codec_t</a>, <a class="el" href="codec_8h-source.html#l00041">codec_s::flush</a>, <a class="el" href="codec_8h-source.html#l00042">codec_s::free</a>, and <a class="el" href="codec_8h-source.html#l00040">codec_s::transform</a>.
<p>
Referenced by <a class="el" href="session_8c-source.html#l00413">session_prv_load_from_io()</a>, <a class="el" href="session_8c-source.html#l00664">session_prv_save_to_io()</a>, and <a class="el" href="translat_8c-source.html#l00230">translate()</a>. </td>
</tr>
</table>
<a class="anchor" name="ga3" doxytag="codec.c::codec_free"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">int codec_free </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="structcodec__s.html">codec_t</a> * </td>
<td class="mdname1" valign="top" nowrap> <em>codec</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
Dispose all the resources allocated to the supplied <code>codec</code> <p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>codec</em> </td><td>the <code>codec_t</code> object to be disposed</td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>always successful, i.e. <code>0</code> </dd></dl>
<p>
Definition at line <a class="el" href="codec_8c-source.html#l00028">28</a> of file <a class="el" href="codec_8c-source.html">codec.c</a>.
<p>
References <a class="el" href="codec_8h.html#a4">codec_t</a>, and <a class="el" href="codec_8h-source.html#l00042">codec_s::free</a>.
<p>
Referenced by <a class="el" href="emb_8c-source.html#l00133">emb_open()</a>, <a class="el" href="io_8c-source.html#l00852">io_codecs_remove()</a>, <a class="el" href="session_8c-source.html#l00413">session_prv_load_from_io()</a>, <a class="el" href="session_8c-source.html#l00664">session_prv_save_to_io()</a>, and <a class="el" href="translat_8c-source.html#l00230">translate()</a>. </td>
</tr>
</table>
<a class="anchor" name="ga7" doxytag="gzip.c::codec_gzip_create"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">int codec_gzip_create </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">int </td>
<td class="mdname" nowrap> <em>op</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap><a class="el" href="structcodec__s.html">codec_t</a> ** </td>
<td class="mdname" nowrap> <em>piz</em></td>
</tr>
<tr>
<td class="md"></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
Create a gzip <code>codec_t</code> object at <code>*piz</code> suitable for compression or decompression (depending on <code>op</code>).<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>op</em> </td><td>one of <code>GZIP_COMPRESS</code> or <code>GZIP_UNCOMPRESS</code> </td></tr>
<tr><td valign="top"></td><td valign="top"><em>piz</em> </td><td>the created codec as a value-result arguement</td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd><code>0</code> on success, <code>~0</code> otherwise </dd></dl>
<p>
Definition at line <a class="el" href="gzip_8c-source.html#l00142">142</a> of file <a class="el" href="gzip_8c-source.html">gzip.c</a>.
<p>
References <a class="el" href="gzip_8c-source.html#l00035">codec_gzip_t</a>, <a class="el" href="codec_8h.html#a4">codec_t</a>, <a class="el" href="codec_8h-source.html#l00041">codec_s::flush</a>, <a class="el" href="codec_8h-source.html#l00042">codec_s::free</a>, <a class="el" href="cgzip_8h.html#a3a0">GZIP_COMPRESS</a>, <a class="el" href="cgzip_8h.html#a3a1">GZIP_UNCOMPRESS</a>, and <a class="el" href="codec_8h-source.html#l00040">codec_s::transform</a>.
<p>
Referenced by <a class="el" href="emb_8c-source.html#l00133">emb_open()</a>, <a class="el" href="session_8c-source.html#l00413">session_prv_load_from_io()</a>, <a class="el" href="session_8c-source.html#l00664">session_prv_save_to_io()</a>, and <a class="el" href="translat_8c-source.html#l00230">translate()</a>. </td>
</tr>
</table>
<a class="anchor" name="ga11" doxytag="null.c::codec_null_create"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">int codec_null_create </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="structcodec__s.html">codec_t</a> ** </td>
<td class="mdname1" valign="top" nowrap> <em>pcn</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
Create a null <code>codec_t</code> object at <code>*pcn</code>.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>pcn</em> </td><td>the created codec as a value-result arguement</td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd><code>0</code> on success, <code>~0</code> otherwise </dd></dl>
<p>
Definition at line <a class="el" href="null_8c-source.html#l00074">74</a> of file <a class="el" href="null_8c-source.html">null.c</a>.
<p>
References <a class="el" href="null_8c-source.html#l00027">codec_null_t</a>, and <a class="el" href="codec_8h.html#a4">codec_t</a>. </td>
</tr>
</table>
<hr>
<div>
<div style="text-align:left">
<a href="http://www.koanlogic.com/kl/cont/gb/html/products.html">←Products</a>
</div>
<div style="text-align:center;">
© 2005-2006 - <a href="http://www.koanlogic.com">KoanLogic S.r.l.</a> - All rights reserved
</div>
</div>
</body>
</html>
|