Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > media > main-release > by-pkgid > d4a6745d7fbd92dfb64dce5e91e08f80 > files > 86

lib64meanwhile1-doc-1.0.2-1mdv2008.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>meanwhile: mw_cipher.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="classes.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>mw_cipher.h</h1><a href="mw__cipher_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 
<a name="l00002"></a>00002 <span class="comment">/*</span>
<a name="l00003"></a>00003 <span class="comment">  Meanwhile - Unofficial Lotus Sametime Community Client Library</span>
<a name="l00004"></a>00004 <span class="comment">  Copyright (C) 2004  Christopher (siege) O'Brien</span>
<a name="l00005"></a>00005 <span class="comment">  </span>
<a name="l00006"></a>00006 <span class="comment">  This library is free software; you can redistribute it and/or</span>
<a name="l00007"></a>00007 <span class="comment">  modify it under the terms of the GNU Library General Public</span>
<a name="l00008"></a>00008 <span class="comment">  License as published by the Free Software Foundation; either</span>
<a name="l00009"></a>00009 <span class="comment">  version 2 of the License, or (at your option) any later version.</span>
<a name="l00010"></a>00010 <span class="comment">  </span>
<a name="l00011"></a>00011 <span class="comment">  This library is distributed in the hope that it will be useful,</span>
<a name="l00012"></a>00012 <span class="comment">  but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00013"></a>00013 <span class="comment">  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</span>
<a name="l00014"></a>00014 <span class="comment">  Library General Public License for more details.</span>
<a name="l00015"></a>00015 <span class="comment">  </span>
<a name="l00016"></a>00016 <span class="comment">  You should have received a copy of the GNU Library General Public</span>
<a name="l00017"></a>00017 <span class="comment">  License along with this library; if not, write to the Free</span>
<a name="l00018"></a>00018 <span class="comment">  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA</span>
<a name="l00019"></a>00019 <span class="comment">*/</span>
<a name="l00020"></a>00020 
<a name="l00021"></a>00021 <span class="preprocessor">#ifndef _MW_CIPHER_H</span>
<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define _MW_CIPHER_H</span>
<a name="l00023"></a>00023 <span class="preprocessor"></span>
<a name="l00024"></a>00024 
<a name="l00025"></a>00025 <span class="preprocessor">#include &lt;glib.h&gt;</span>
<a name="l00026"></a>00026 <span class="preprocessor">#include "<a class="code" href="mw__common_8h.html" title="Common data types and functions for handling those types.">mw_common.h</a>"</span>
<a name="l00027"></a>00027 
<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>
<a name="l00032"></a>00032 <span class="preprocessor"></span>
<a name="l00033"></a>00033 
<a name="l00034"></a>00034 <span class="comment">/* place-holders */</span>
<a name="l00035"></a>00035 <span class="keyword">struct </span><a class="code" href="structmwChannel.html" title="Represents a channel to a service.">mwChannel</a>;
<a name="l00036"></a>00036 <span class="keyword">struct </span><a class="code" href="structmwSession.html" title="Represents a Sametime client session.">mwSession</a>;
<a name="l00037"></a>00037 
<a name="l00038"></a>00038 
<a name="l00041"></a><a class="code" href="mw__cipher_8h.html#3d1e1cc055146237e1b8e638c5005a70">00041</a> <span class="keyword">enum</span> <a class="code" href="mw__cipher_8h.html#3d1e1cc055146237e1b8e638c5005a70" title="Common cipher types.">mwCipherType</a> {
<a name="l00042"></a><a class="code" href="mw__cipher_8h.html#3d1e1cc055146237e1b8e638c5005a70b67b342eb4ad1f28624235e7d2b1509b">00042</a>   <a class="code" href="mw__cipher_8h.html#3d1e1cc055146237e1b8e638c5005a70b67b342eb4ad1f28624235e7d2b1509b">mwCipher_RC2_40</a>   = 0x0000,
<a name="l00043"></a><a class="code" href="mw__cipher_8h.html#3d1e1cc055146237e1b8e638c5005a70b9732b499466e669cf5f8de3e09770f8">00043</a>   <a class="code" href="mw__cipher_8h.html#3d1e1cc055146237e1b8e638c5005a70b9732b499466e669cf5f8de3e09770f8">mwCipher_RC2_128</a>  = 0x0001,
<a name="l00044"></a>00044 };
<a name="l00045"></a>00045 
<a name="l00046"></a>00046 
<a name="l00047"></a>00047 <span class="keyword">struct </span><a class="code" href="structmwCipher.html" title="A cipher.">mwCipher</a>;
<a name="l00048"></a>00048 <span class="keyword">struct </span><a class="code" href="structmwCipherInstance.html" title="An instance of a cipher.">mwCipherInstance</a>;
<a name="l00049"></a>00049 
<a name="l00050"></a>00050 
<a name="l00053"></a>00053 <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structmwCipherInstance.html" title="An instance of a cipher.">mwCipherInstance</a> *(*mwCipherInstantiator)
<a name="l00054"></a><a class="code" href="mw__cipher_8h.html#866fc29431a5cd1c3c49e9b1e8b09800">00054</a>      (<span class="keyword">struct </span><a class="code" href="structmwCipher.html" title="A cipher.">mwCipher</a> *cipher, <span class="keyword">struct </span><a class="code" href="structmwChannel.html" title="Represents a channel to a service.">mwChannel</a> *chan);
<a name="l00055"></a>00055 
<a name="l00056"></a>00056 
<a name="l00061"></a>00061 <span class="keyword">typedef</span> int (*<a class="code" href="mw__cipher_8h.html#130909e22689a8b83c70572af9850bef" title="Process (encrypt or decrypt, depending) the given data.">mwCipherProcessor</a>)
<a name="l00062"></a><a class="code" href="mw__cipher_8h.html#130909e22689a8b83c70572af9850bef">00062</a>      (<span class="keyword">struct </span><a class="code" href="structmwCipherInstance.html" title="An instance of a cipher.">mwCipherInstance</a> *ci, <span class="keyword">struct </span><a class="code" href="structmwOpaque.html" title="A length of binary data, not null-terminated.">mwOpaque</a> *<a class="code" href="structmwOpaque.html#5b825ce89e8c20605d70ad593f57684e" title="data, normally with no NULL termination">data</a>);
<a name="l00063"></a>00063 
<a name="l00064"></a>00064 
<a name="l00070"></a><a class="code" href="structmwCipher.html">00070</a> <span class="keyword">struct </span><a class="code" href="structmwCipher.html" title="A cipher.">mwCipher</a> {
<a name="l00071"></a>00071 
<a name="l00074"></a><a class="code" href="structmwCipher.html#ec395dce47a0b5f4779522bd0c1888e2">00074</a>   <span class="keyword">struct </span><a class="code" href="structmwSession.html" title="Represents a Sametime client session.">mwSession</a> *<a class="code" href="structmwCipher.html#ec395dce47a0b5f4779522bd0c1888e2" title="service this cipher is providing for">session</a>;
<a name="l00075"></a>00075 
<a name="l00076"></a><a class="code" href="structmwCipher.html#a65d8c035878ffd68aa21099a18eb959">00076</a>   guint16 <a class="code" href="structmwCipher.html#a65d8c035878ffd68aa21099a18eb959" title="mwCipher_getType">type</a>;               
<a name="l00077"></a>00077   <span class="keyword">const</span> <span class="keywordtype">char</span> *(*get_name)();  
<a name="l00078"></a>00078   <span class="keyword">const</span> <span class="keywordtype">char</span> *(*get_desc)();  
<a name="l00082"></a><a class="code" href="structmwCipher.html#dfed31e997b9a9ba78363fdb1476253b">00082</a>   <a class="code" href="mw__cipher_8h.html#866fc29431a5cd1c3c49e9b1e8b09800" title="Obtain an instance of a given cipher, which can be used for the processing of a single...">mwCipherInstantiator</a> <a class="code" href="structmwCipher.html#dfed31e997b9a9ba78363fdb1476253b" title="Generate a new Cipher Instance for use on a channel.">new_instance</a>;
<a name="l00083"></a>00083 
<a name="l00084"></a>00084   void (*<a class="code" href="structmwCipher.html#e47e505d184f4d6ea6a2762f76aba9e4">offered</a>)(<span class="keyword">struct </span><a class="code" href="structmwCipherInstance.html" title="An instance of a cipher.">mwCipherInstance</a> *ci, <span class="keyword">struct </span><a class="code" href="structmwEncryptItem.html" title="encryption blocks">mwEncryptItem</a> *item);
<a name="l00085"></a>00085   <span class="keyword">struct </span><a class="code" href="structmwEncryptItem.html" title="encryption blocks">mwEncryptItem</a> *(*offer)(<span class="keyword">struct </span><a class="code" href="structmwCipherInstance.html" title="An instance of a cipher.">mwCipherInstance</a> *ci);
<a name="l00086"></a>00086   void (*<a class="code" href="structmwCipher.html#ae223ec72cfa4f9fc0fea723609edfff">accepted</a>)(<span class="keyword">struct </span><a class="code" href="structmwCipherInstance.html" title="An instance of a cipher.">mwCipherInstance</a> *ci, <span class="keyword">struct </span><a class="code" href="structmwEncryptItem.html" title="encryption blocks">mwEncryptItem</a> *item);
<a name="l00087"></a>00087   <span class="keyword">struct </span><a class="code" href="structmwEncryptItem.html" title="encryption blocks">mwEncryptItem</a> *(*accept)(<span class="keyword">struct </span><a class="code" href="structmwCipherInstance.html" title="An instance of a cipher.">mwCipherInstance</a> *ci);
<a name="l00088"></a>00088 
<a name="l00089"></a><a class="code" href="structmwCipher.html#c3fa2b1a18b7924450bc5343624b8a2a">00089</a>   <a class="code" href="mw__cipher_8h.html#130909e22689a8b83c70572af9850bef" title="Process (encrypt or decrypt, depending) the given data.">mwCipherProcessor</a> <a class="code" href="structmwCipher.html#c3fa2b1a18b7924450bc5343624b8a2a" title="mwCipherInstance_encrypt">encrypt</a>; 
<a name="l00090"></a><a class="code" href="structmwCipher.html#9dff138daf0f325e897dea90e70078b6">00090</a>   <a class="code" href="mw__cipher_8h.html#130909e22689a8b83c70572af9850bef" title="Process (encrypt or decrypt, depending) the given data.">mwCipherProcessor</a> <a class="code" href="structmwCipher.html#9dff138daf0f325e897dea90e70078b6" title="mwCipherInstance_decrypt">decrypt</a>; 
<a name="l00094"></a>00094   void (*<a class="code" href="structmwCipher.html#2759a966db6c87ccbc7a30351d04b52c" title="prepare this cipher for being free&amp;#39;d">clear</a>)(<span class="keyword">struct </span><a class="code" href="structmwCipher.html" title="A cipher.">mwCipher</a> *c);
<a name="l00095"></a>00095 
<a name="l00098"></a>00098   void (*<a class="code" href="structmwCipher.html#c15dbe512f0e1b1c24923f39596022fa" title="clean up a cipher instance before being free&amp;#39;d">clear_instance</a>)(<span class="keyword">struct </span><a class="code" href="structmwCipherInstance.html" title="An instance of a cipher.">mwCipherInstance</a> *ci);
<a name="l00099"></a>00099 };
<a name="l00100"></a>00100 
<a name="l00101"></a>00101 
<a name="l00105"></a><a class="code" href="structmwCipherInstance.html">00105</a> <span class="keyword">struct </span><a class="code" href="structmwCipherInstance.html" title="An instance of a cipher.">mwCipherInstance</a> {
<a name="l00106"></a>00106 
<a name="l00109"></a><a class="code" href="structmwCipherInstance.html#dc1e6ea7dad87ee08f3a4a384f6a5cd4">00109</a>   <span class="keyword">struct </span><a class="code" href="structmwCipher.html" title="A cipher.">mwCipher</a> *cipher;
<a name="l00110"></a>00110 
<a name="l00113"></a><a class="code" href="structmwCipherInstance.html#fa28caf93d50992ce5b8c7edf5a7c317">00113</a>   <span class="keyword">struct </span><a class="code" href="structmwChannel.html" title="Represents a channel to a service.">mwChannel</a> *<a class="code" href="structmwCipherInstance.html#fa28caf93d50992ce5b8c7edf5a7c317" title="the channel this instances processes">channel</a>;
<a name="l00114"></a>00114 };
<a name="l00115"></a>00115 
<a name="l00116"></a>00116 
<a name="l00117"></a>00117 <span class="keyword">struct </span><a class="code" href="structmwCipher.html" title="A cipher.">mwCipher</a> *<a class="code" href="mw__cipher_8h.html#42e8c2c577767f23154b2c1f09fd15e0">mwCipher_new_RC2_40</a>(<span class="keyword">struct</span> <a class="code" href="structmwSession.html" title="Represents a Sametime client session.">mwSession</a> *s);
<a name="l00118"></a>00118 
<a name="l00119"></a>00119 
<a name="l00120"></a>00120 <span class="keyword">struct </span><a class="code" href="structmwCipher.html" title="A cipher.">mwCipher</a> *<a class="code" href="mw__cipher_8h.html#8994381485d3dd43b72933a6043c74cd">mwCipher_new_RC2_128</a>(<span class="keyword">struct</span> <a class="code" href="structmwSession.html" title="Represents a Sametime client session.">mwSession</a> *s);
<a name="l00121"></a>00121 
<a name="l00122"></a>00122 
<a name="l00123"></a>00123 <span class="keyword">struct </span><a class="code" href="structmwSession.html" title="Represents a Sametime client session.">mwSession</a> *<a class="code" href="mw__cipher_8h.html#ca7df61aefa4a1eda2776c9d11d66c04">mwCipher_getSession</a>(<span class="keyword">struct</span> <a class="code" href="structmwCipher.html" title="A cipher.">mwCipher</a> *cipher);
<a name="l00124"></a>00124 
<a name="l00125"></a>00125 
<a name="l00126"></a>00126 guint16 <a class="code" href="mw__cipher_8h.html#9c78471afd459b09ddf5e544d9a07f56">mwCipher_getType</a>(<span class="keyword">struct</span> <a class="code" href="structmwCipher.html" title="A cipher.">mwCipher</a> *cipher);
<a name="l00127"></a>00127 
<a name="l00128"></a>00128 
<a name="l00129"></a>00129 <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="mw__cipher_8h.html#57a44521a627c04f67fd26b6112c232e">mwCipher_getName</a>(<span class="keyword">struct</span> <a class="code" href="structmwCipher.html" title="A cipher.">mwCipher</a> *cipher);
<a name="l00130"></a>00130 
<a name="l00131"></a>00131 
<a name="l00132"></a>00132 <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="mw__cipher_8h.html#2fe3c59366be8e33dea3ea8089f17309">mwCipher_getDesc</a>(<span class="keyword">struct</span> <a class="code" href="structmwCipher.html" title="A cipher.">mwCipher</a> *cipher);
<a name="l00133"></a>00133 
<a name="l00134"></a>00134 
<a name="l00135"></a>00135 <span class="keyword">struct </span><a class="code" href="structmwCipherInstance.html" title="An instance of a cipher.">mwCipherInstance</a> *<a class="code" href="mw__cipher_8h.html#0d03f56fb313094c1129a4e8086cfce3">mwCipher_newInstance</a>(<span class="keyword">struct</span> <a class="code" href="structmwCipher.html" title="A cipher.">mwCipher</a> *cipher,
<a name="l00136"></a>00136                                               <span class="keyword">struct</span> <a class="code" href="structmwChannel.html" title="Represents a channel to a service.">mwChannel</a> *<a class="code" href="structmwCipherInstance.html#fa28caf93d50992ce5b8c7edf5a7c317" title="the channel this instances processes">channel</a>);
<a name="l00137"></a>00137 
<a name="l00138"></a>00138 
<a name="l00140"></a>00140 <span class="keywordtype">void</span> <a class="code" href="mw__cipher_8h.html#4d6a169e214b8e6b60e6fb2e7c5c51bd" title="destroy a cipher">mwCipher_free</a>(<span class="keyword">struct</span> <a class="code" href="structmwCipher.html" title="A cipher.">mwCipher</a>* cipher);
<a name="l00141"></a>00141 
<a name="l00142"></a>00142 
<a name="l00144"></a>00144 <span class="keyword">struct </span><a class="code" href="structmwCipher.html" title="A cipher.">mwCipher</a> *<a class="code" href="mw__cipher_8h.html#014d426ae329bf07cc3c49d46d7482b4" title="reference the parent cipher of an instance">mwCipherInstance_getCipher</a>(<span class="keyword">struct</span> <a class="code" href="structmwCipherInstance.html" title="An instance of a cipher.">mwCipherInstance</a> *ci);
<a name="l00145"></a>00145 
<a name="l00146"></a>00146 
<a name="l00148"></a>00148 <span class="keyword">struct </span><a class="code" href="structmwChannel.html" title="Represents a channel to a service.">mwChannel</a> *<a class="code" href="mw__cipher_8h.html#d1a85931da52a2d26072f92e046e5027" title="reference the channel a cipher instance is attached to">mwCipherInstance_getChannel</a>(<span class="keyword">struct</span> <a class="code" href="structmwCipherInstance.html" title="An instance of a cipher.">mwCipherInstance</a> *ci);
<a name="l00149"></a>00149 
<a name="l00150"></a>00150 
<a name="l00152"></a>00152 <span class="keywordtype">void</span> <a class="code" href="mw__cipher_8h.html#ca54b3578379f8f7e8a3497643d9ff52" title="Indicates a cipher has been offered to our channel.">mwCipherInstance_offered</a>(<span class="keyword">struct</span> <a class="code" href="structmwCipherInstance.html" title="An instance of a cipher.">mwCipherInstance</a> *ci,
<a name="l00153"></a>00153                               <span class="keyword">struct</span> <a class="code" href="structmwEncryptItem.html" title="encryption blocks">mwEncryptItem</a> *item);
<a name="l00154"></a>00154 
<a name="l00155"></a>00155 
<a name="l00157"></a>00157 <span class="keyword">struct </span><a class="code" href="structmwEncryptItem.html" title="encryption blocks">mwEncryptItem</a> *
<a name="l00158"></a>00158 <a class="code" href="mw__cipher_8h.html#c9b0176eb3578c5e0b5d1aefb75921c1" title="Offer a cipher.">mwCipherInstance_offer</a>(<span class="keyword">struct</span> <a class="code" href="structmwCipherInstance.html" title="An instance of a cipher.">mwCipherInstance</a> *ci);
<a name="l00159"></a>00159 
<a name="l00160"></a>00160 
<a name="l00162"></a>00162 <span class="keywordtype">void</span> <a class="code" href="mw__cipher_8h.html#12cef66d5336ee880cdd812c2dbe7ff3" title="Indicates an offered cipher has been accepted.">mwCipherInstance_accepted</a>(<span class="keyword">struct</span> <a class="code" href="structmwCipherInstance.html" title="An instance of a cipher.">mwCipherInstance</a> *ci,
<a name="l00163"></a>00163                                <span class="keyword">struct</span> <a class="code" href="structmwEncryptItem.html" title="encryption blocks">mwEncryptItem</a> *item);
<a name="l00164"></a>00164 
<a name="l00165"></a>00165 
<a name="l00167"></a>00167 <span class="keyword">struct </span><a class="code" href="structmwEncryptItem.html" title="encryption blocks">mwEncryptItem</a> *
<a name="l00168"></a>00168 <a class="code" href="mw__cipher_8h.html#68d12ba00aadc58033d326d3393c9a58" title="Accept a cipher offered to our channel.">mwCipherInstance_accept</a>(<span class="keyword">struct</span> <a class="code" href="structmwCipherInstance.html" title="An instance of a cipher.">mwCipherInstance</a> *ci);
<a name="l00169"></a>00169 
<a name="l00170"></a>00170 
<a name="l00172"></a>00172 <span class="keywordtype">int</span> <a class="code" href="mw__cipher_8h.html#fbdb09cd3991970596b9e7ad1865a4b5" title="encrypt data">mwCipherInstance_encrypt</a>(<span class="keyword">struct</span> <a class="code" href="structmwCipherInstance.html" title="An instance of a cipher.">mwCipherInstance</a> *ci,
<a name="l00173"></a>00173                              <span class="keyword">struct</span> <a class="code" href="structmwOpaque.html" title="A length of binary data, not null-terminated.">mwOpaque</a> *data);
<a name="l00174"></a>00174 
<a name="l00175"></a>00175 
<a name="l00177"></a>00177 <span class="keywordtype">int</span> <a class="code" href="mw__cipher_8h.html#20e64408792db9e2845f8a7865eefe65" title="decrypt data">mwCipherInstance_decrypt</a>(<span class="keyword">struct</span> <a class="code" href="structmwCipherInstance.html" title="An instance of a cipher.">mwCipherInstance</a> *ci,
<a name="l00178"></a>00178                              <span class="keyword">struct</span> <a class="code" href="structmwOpaque.html" title="A length of binary data, not null-terminated.">mwOpaque</a> *data);
<a name="l00179"></a>00179 
<a name="l00180"></a>00180 
<a name="l00182"></a>00182 <span class="keywordtype">void</span> <a class="code" href="mw__cipher_8h.html#302cdec8d916252920962bc7aefe39a4" title="destroy a cipher instance">mwCipherInstance_free</a>(<span class="keyword">struct</span> <a class="code" href="structmwCipherInstance.html" title="An instance of a cipher.">mwCipherInstance</a> *ci);
<a name="l00183"></a>00183 
<a name="l00184"></a>00184 
<a name="l00191"></a>00191 <span class="comment">/* @{ */</span>
<a name="l00192"></a>00192 
<a name="l00193"></a>00193 
<a name="l00198"></a>00198 <span class="keywordtype">void</span> <a class="code" href="mw__cipher_8h.html#4606773752ee1a6ff4a44c217a39e348" title="generate some pseudo-random bytes">mwKeyRandom</a>(guchar *key, gsize keylen);
<a name="l00199"></a>00199 
<a name="l00200"></a>00200 
<a name="l00202"></a>00202 <span class="keywordtype">void</span> <a class="code" href="mw__cipher_8h.html#4164e217eb715d505ee0bb1d75d983f1" title="Setup an Initialization Vector.">mwIV_init</a>(guchar *iv);
<a name="l00203"></a>00203 
<a name="l00204"></a>00204 
<a name="l00207"></a>00207 <span class="keywordtype">void</span> <a class="code" href="mw__cipher_8h.html#1fb65f55e064360183cee4bbe2a93c19" title="Expand a variable-length key into a 128-byte key (represented as an an array of 64...">mwKeyExpand</a>(<span class="keywordtype">int</span> *ekey, <span class="keyword">const</span> guchar *key, gsize keylen);
<a name="l00208"></a>00208 
<a name="l00209"></a>00209 
<a name="l00211"></a>00211 <span class="keywordtype">void</span> <a class="code" href="mw__cipher_8h.html#934b08511236b5e8cf80c22acc937f51" title="Encrypt data using an already-expanded key.">mwEncryptExpanded</a>(<span class="keyword">const</span> <span class="keywordtype">int</span> *ekey, guchar *iv,
<a name="l00212"></a>00212                        <span class="keyword">struct</span> <a class="code" href="structmwOpaque.html" title="A length of binary data, not null-terminated.">mwOpaque</a> *in,
<a name="l00213"></a>00213                        <span class="keyword">struct</span> <a class="code" href="structmwOpaque.html" title="A length of binary data, not null-terminated.">mwOpaque</a> *out);
<a name="l00214"></a>00214 
<a name="l00215"></a>00215 
<a name="l00217"></a>00217 <span class="keywordtype">void</span> <a class="code" href="mw__cipher_8h.html#4ff69a2373683cbecb91039dd1a46fa1" title="Encrypt data using an expanded form of the given key.">mwEncrypt</a>(<span class="keyword">const</span> guchar *key, gsize keylen, guchar *iv,
<a name="l00218"></a>00218                <span class="keyword">struct</span> <a class="code" href="structmwOpaque.html" title="A length of binary data, not null-terminated.">mwOpaque</a> *in, <span class="keyword">struct</span> <a class="code" href="structmwOpaque.html" title="A length of binary data, not null-terminated.">mwOpaque</a> *out);
<a name="l00219"></a>00219 
<a name="l00220"></a>00220 
<a name="l00222"></a>00222 <span class="keywordtype">void</span> <a class="code" href="mw__cipher_8h.html#cb001137b268c78457e75185fdbbd9c9" title="Decrypt data using an already expanded key.">mwDecryptExpanded</a>(<span class="keyword">const</span> <span class="keywordtype">int</span> *ekey, guchar *iv,
<a name="l00223"></a>00223                        <span class="keyword">struct</span> <a class="code" href="structmwOpaque.html" title="A length of binary data, not null-terminated.">mwOpaque</a> *in,
<a name="l00224"></a>00224                        <span class="keyword">struct</span> <a class="code" href="structmwOpaque.html" title="A length of binary data, not null-terminated.">mwOpaque</a> *out);
<a name="l00225"></a>00225 
<a name="l00226"></a>00226 
<a name="l00228"></a>00228 <span class="keywordtype">void</span> <a class="code" href="mw__cipher_8h.html#1ea4d9e89089fcde39ff462a5404e704" title="Decrypt data using an expanded form of the given key.">mwDecrypt</a>(<span class="keyword">const</span> guchar *key, gsize keylen, guchar *iv,
<a name="l00229"></a>00229                <span class="keyword">struct</span> <a class="code" href="structmwOpaque.html" title="A length of binary data, not null-terminated.">mwOpaque</a> *in, <span class="keyword">struct</span> <a class="code" href="structmwOpaque.html" title="A length of binary data, not null-terminated.">mwOpaque</a> *out);
<a name="l00230"></a>00230 
<a name="l00231"></a>00231 
<a name="l00232"></a>00232 <span class="comment">/* @} */</span>
<a name="l00233"></a>00233 
<a name="l00234"></a>00234 
<a name="l00247"></a>00247 <span class="comment">/* @{ */</span>
<a name="l00248"></a>00248 
<a name="l00249"></a>00249 
<a name="l00251"></a>00251 <span class="keyword">struct </span><a class="code" href="structmwMpi.html">mwMpi</a>;
<a name="l00252"></a>00252 
<a name="l00253"></a>00253 
<a name="l00255"></a>00255 <span class="keyword">struct </span><a class="code" href="structmwMpi.html">mwMpi</a> *<a class="code" href="mw__cipher_8h.html#b473b17d569e7566081cad121f75f23e" title="prepare a new mpi value">mwMpi_new</a>();
<a name="l00256"></a>00256 
<a name="l00257"></a>00257 
<a name="l00259"></a>00259 <span class="keywordtype">void</span> <a class="code" href="mw__cipher_8h.html#674f737698d67c52dce06f54151909ef" title="destroy an mpi value">mwMpi_free</a>(<span class="keyword">struct</span> <a class="code" href="structmwMpi.html">mwMpi</a> *i);
<a name="l00260"></a>00260 
<a name="l00261"></a>00261 
<a name="l00263"></a>00263 <span class="keywordtype">void</span> <a class="code" href="mw__cipher_8h.html#4dcaf6196943a70f723c828cab35f0c1" title="Import a value from an opaque.">mwMpi_import</a>(<span class="keyword">struct</span> <a class="code" href="structmwMpi.html">mwMpi</a> *i, <span class="keyword">struct</span> <a class="code" href="structmwOpaque.html" title="A length of binary data, not null-terminated.">mwOpaque</a> *o);
<a name="l00264"></a>00264 
<a name="l00265"></a>00265 
<a name="l00267"></a>00267 <span class="keywordtype">void</span> <a class="code" href="mw__cipher_8h.html#389f3d2f174e66810a92ee93d5035967" title="Export a value into an opaque.">mwMpi_export</a>(<span class="keyword">struct</span> <a class="code" href="structmwMpi.html">mwMpi</a> *i, <span class="keyword">struct</span> <a class="code" href="structmwOpaque.html" title="A length of binary data, not null-terminated.">mwOpaque</a> *o);
<a name="l00268"></a>00268 
<a name="l00269"></a>00269 
<a name="l00271"></a>00271 <span class="keywordtype">void</span> <a class="code" href="mw__cipher_8h.html#892796c968b68d71e67b678a87504d20" title="set a big integer to the Sametime Prime value">mwMpi_setDHPrime</a>(<span class="keyword">struct</span> <a class="code" href="structmwMpi.html">mwMpi</a> *i);
<a name="l00272"></a>00272 
<a name="l00273"></a>00273 
<a name="l00275"></a>00275 <span class="keywordtype">void</span> <a class="code" href="mw__cipher_8h.html#dd1ffe92fc1c256fa767a34d58433dd1" title="set a big integer to the Sametime Base value">mwMpi_setDHBase</a>(<span class="keyword">struct</span> <a class="code" href="structmwMpi.html">mwMpi</a> *i);
<a name="l00276"></a>00276 
<a name="l00277"></a>00277 
<a name="l00280"></a>00280 <span class="keywordtype">void</span> <a class="code" href="mw__cipher_8h.html#95e8808f20ea58c66014a052375c5fe4" title="sets private to a randomly generated value, and calculates public using the Sametime...">mwMpi_randDHKeypair</a>(<span class="keyword">struct</span> <a class="code" href="structmwMpi.html">mwMpi</a> *private_key, <span class="keyword">struct</span> <a class="code" href="structmwMpi.html">mwMpi</a> *public_key);
<a name="l00281"></a>00281 
<a name="l00282"></a>00282 
<a name="l00285"></a>00285 <span class="keywordtype">void</span> <a class="code" href="mw__cipher_8h.html#796525794edf3887ab94eefb748bcf91" title="sets the shared key value based on the remote and private keys, using the Sametime...">mwMpi_calculateDHShared</a>(<span class="keyword">struct</span> <a class="code" href="structmwMpi.html">mwMpi</a> *shared_key, <span class="keyword">struct</span> <a class="code" href="structmwMpi.html">mwMpi</a> *remote_key,
<a name="l00286"></a>00286                              <span class="keyword">struct</span> <a class="code" href="structmwMpi.html">mwMpi</a> *private_key);
<a name="l00287"></a>00287 
<a name="l00288"></a>00288 
<a name="l00289"></a>00289 <span class="comment">/* @} */</span>
<a name="l00290"></a>00290 
<a name="l00291"></a>00291 
<a name="l00292"></a>00292 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l00293"></a>00293 <span class="preprocessor"></span>}
<a name="l00294"></a>00294 <span class="preprocessor">#endif</span>
<a name="l00295"></a>00295 <span class="preprocessor"></span>
<a name="l00296"></a>00296 
<a name="l00297"></a>00297 <span class="preprocessor">#endif </span><span class="comment">/* _MW_CIPHER_H */</span>
</pre></div><hr size="1"><address style="text-align: right;"><small>Generated on Wed Dec 19 09:10:33 2007 for meanwhile 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>