Sophie

Sophie

distrib > Fedora > 14 > x86_64 > media > updates > by-pkgid > 8df484ca79a7b6bb61e4a376e1506870 > files > 44

polarssl-devel-0.14.3-1.fc14.x86_64.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>PolarSSL: polarssl/camellia.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">PolarSSL</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
  <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>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li id="searchli">
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </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>File&#160;Members</span></a></li>
    </ul>
  </div>
<div class="header">
  <div class="headertitle">
<div class="title">polarssl/camellia.h</div>  </div>
</div>
<div class="contents">
<a href="camellia_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 
<a name="l00025"></a>00025 <span class="preprocessor">#ifndef POLARSSL_CAMELLIA_H</span>
<a name="l00026"></a>00026 <span class="preprocessor"></span><span class="preprocessor">#define POLARSSL_CAMELLIA_H</span>
<a name="l00027"></a>00027 <span class="preprocessor"></span>
<a name="l00028"></a>00028 <span class="preprocessor">#ifdef _MSC_VER</span>
<a name="l00029"></a>00029 <span class="preprocessor"></span><span class="preprocessor">#include &lt;basetsd.h&gt;</span>
<a name="l00030"></a>00030 <span class="keyword">typedef</span> UINT32 uint32_t;
<a name="l00031"></a>00031 <span class="preprocessor">#else</span>
<a name="l00032"></a>00032 <span class="preprocessor"></span><span class="preprocessor">#include &lt;inttypes.h&gt;</span>
<a name="l00033"></a>00033 <span class="preprocessor">#endif</span>
<a name="l00034"></a>00034 <span class="preprocessor"></span>
<a name="l00035"></a>00035 <span class="preprocessor">#define CAMELLIA_ENCRYPT     1</span>
<a name="l00036"></a>00036 <span class="preprocessor"></span><span class="preprocessor">#define CAMELLIA_DECRYPT     0</span>
<a name="l00037"></a>00037 <span class="preprocessor"></span>
<a name="l00038"></a>00038 <span class="preprocessor">#define POLARSSL_ERR_CAMELLIA_INVALID_KEY_LENGTH            -0x0a00</span>
<a name="l00039"></a>00039 <span class="preprocessor"></span><span class="preprocessor">#define POLARSSL_ERR_CAMELLIA_INVALID_INPUT_LENGTH          -0x0a10</span>
<a name="l00040"></a>00040 <span class="preprocessor"></span>
<a name="l00044"></a><a class="code" href="structcamellia__context.html">00044</a> <span class="keyword">typedef</span> <span class="keyword">struct</span>
<a name="l00045"></a>00045 {
<a name="l00046"></a><a class="code" href="structcamellia__context.html#a55965e521f4af1510f8c3d1b40ef35a2">00046</a>     <span class="keywordtype">int</span> <a class="code" href="structcamellia__context.html#a55965e521f4af1510f8c3d1b40ef35a2">nr</a>;                     
<a name="l00047"></a><a class="code" href="structcamellia__context.html#aeb2ff9d18fc9d330712366cd94ecd485">00047</a>     uint32_t rk[68];            
<a name="l00048"></a>00048 }
<a name="l00049"></a>00049 <a class="code" href="structcamellia__context.html" title="CAMELLIA context structure.">camellia_context</a>;
<a name="l00050"></a>00050 
<a name="l00051"></a>00051 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l00052"></a>00052 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {
<a name="l00053"></a>00053 <span class="preprocessor">#endif</span>
<a name="l00054"></a>00054 <span class="preprocessor"></span>
<a name="l00064"></a>00064 <span class="keywordtype">int</span> <a class="code" href="camellia_8h.html#af89a45b96409dba1926288ab0e5b9d12" title="CAMELLIA key schedule (encryption)">camellia_setkey_enc</a>( <a class="code" href="structcamellia__context.html" title="CAMELLIA context structure.">camellia_context</a> *ctx, <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *key, <span class="keywordtype">int</span> keysize );
<a name="l00065"></a>00065 
<a name="l00075"></a>00075 <span class="keywordtype">int</span> <a class="code" href="camellia_8h.html#aa03870ab00cd673b3fb771666ce32536" title="CAMELLIA key schedule (decryption)">camellia_setkey_dec</a>( <a class="code" href="structcamellia__context.html" title="CAMELLIA context structure.">camellia_context</a> *ctx, <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *key, <span class="keywordtype">int</span> keysize );
<a name="l00076"></a>00076 
<a name="l00087"></a>00087 <span class="keywordtype">int</span> <a class="code" href="camellia_8h.html#a781be26447d028c07f60247532992c3f" title="CAMELLIA-ECB block encryption/decryption.">camellia_crypt_ecb</a>( <a class="code" href="structcamellia__context.html" title="CAMELLIA context structure.">camellia_context</a> *ctx,
<a name="l00088"></a>00088                     <span class="keywordtype">int</span> mode,
<a name="l00089"></a>00089                     <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> input[16],
<a name="l00090"></a>00090                     <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> output[16] );
<a name="l00091"></a>00091 
<a name="l00106"></a>00106 <span class="keywordtype">int</span> <a class="code" href="camellia_8h.html#a3015e54afc816df743c0b3b1764d72f9" title="CAMELLIA-CBC buffer encryption/decryption Length should be a multiple of the block size (16 bytes)...">camellia_crypt_cbc</a>( <a class="code" href="structcamellia__context.html" title="CAMELLIA context structure.">camellia_context</a> *ctx,
<a name="l00107"></a>00107                     <span class="keywordtype">int</span> mode,
<a name="l00108"></a>00108                     <span class="keywordtype">int</span> length,
<a name="l00109"></a>00109                     <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> iv[16],
<a name="l00110"></a>00110                     <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *input,
<a name="l00111"></a>00111                     <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *output );
<a name="l00112"></a>00112 
<a name="l00126"></a>00126 <span class="keywordtype">int</span> <a class="code" href="camellia_8h.html#a87a3acb7da7d0a37a583ed08d4c8d1cf" title="CAMELLIA-CFB128 buffer encryption/decryption.">camellia_crypt_cfb128</a>( <a class="code" href="structcamellia__context.html" title="CAMELLIA context structure.">camellia_context</a> *ctx,
<a name="l00127"></a>00127                        <span class="keywordtype">int</span> mode,
<a name="l00128"></a>00128                        <span class="keywordtype">int</span> length,
<a name="l00129"></a>00129                        <span class="keywordtype">int</span> *iv_off,
<a name="l00130"></a>00130                        <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> iv[16],
<a name="l00131"></a>00131                        <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *input,
<a name="l00132"></a>00132                        <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *output );
<a name="l00133"></a>00133 
<a name="l00139"></a>00139 <span class="keywordtype">int</span> <a class="code" href="camellia_8h.html#aefe7032855e7365dcb4771b80b6f4d70" title="Checkup routine.">camellia_self_test</a>( <span class="keywordtype">int</span> verbose );
<a name="l00140"></a>00140 
<a name="l00141"></a>00141 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l00142"></a>00142 <span class="preprocessor"></span>}
<a name="l00143"></a>00143 <span class="preprocessor">#endif</span>
<a name="l00144"></a>00144 <span class="preprocessor"></span>
<a name="l00145"></a>00145 <span class="preprocessor">#endif </span><span class="comment">/* camellia.h */</span>
</pre></div></div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<hr class="footer"/><address class="footer"><small>Generated on Mon May 16 2011 for PolarSSL by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>