root/WizardsToolkit/trunk/www/api/cipher.html

Revision 813, 10.8 KB (checked in by cristy, 3 months ago)
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
4<head>
5  <style type="text/css"><!--
6    @import url("../../www/wizard.css");
7  //--></style>
8  <title>Wizard's Toolkit: C API for the Wizard's Toolkit: Secure Cipher Algorithm Methods</title>
9  <meta http-equiv="Content-Language" content="en-US"/>
10  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
11  <meta http-equiv="Reply-to" content="magick-users@imagemagick.org"/>
12  <meta name="Generator" content="PHP"/>
13  <meta name="Keywords" content="c, api, for, the, wizard's, toolkit:, secure, cipher, algorithm, methods, WizardsToolkit, Wizard's, Toolkit"/>
14  <meta name="Description" content="The Wizard's Toolkit, version 1.0.2, is a free C API that includes a number of methods most developers will find useful in their projects."/>
15  <meta name="Rating" content="INDEX, FOLLOW"/>
16  <meta name="Robots" content="ALL"/>
17  <meta name="Generator" content="ImageMagick Studio LLC"/>
18  <meta name="Author" content="ImageMagick Studio LLC"/>
19  <meta name="Revisit-after" content="2 DAYS"/>
20  <meta name="Resource-type" content="document"/>
21  <meta name="Copyright" content="Copyright (c) 1999-2009 ImageMagick Studio LLC"/>
22  <meta name="Distribution" content="Global"/>
23  <link rel="shortcut icon" href="../../images/wand.ico"  type="images/vnd.microsoft.icon"/>
24</head>
25
26<body id="www-wizards-toolkit.org">
27  <table id="titlebar" style="width: 100%;background-color: #f5f5f5" cellpadding="0" cellspacing="0" border="0" summary="Wizard's Toolkit">
28    <tbody>
29      <tr valign="top">
30        <td align="left"><a href="../../index.html"><img id="titlebar-west" src="../../images/script.png" alt="[Wizard's Toolkit]" width="400" height="60" border="0" vspace="28" name="titlebar-west" /></a></td>
31        <td align="left"><a href="http://www.wizards-toolkit.org/" target="1627924745"><img id="titlebar-west" src="../../images/sponsor.jpg" alt="[sponsor]" border="0" vspace="28" name="titlebar-west" /></a></td>
32        <td width="99%"><br /></td>
33        <td style="background-color: white" align="right"><a href="../../index.html"><img src="../../images/sprite.jpg" alt="" width="114" height="118" border="0" name="titlebar-east" /></a></td>
34        <td style="background-color: white" align="right"><a href="http://www.wizards-toolkit.org/discourse-server/viewforum.html?f=17" target="929556104"><img id="titlebar-east" src="../../images/logo.jpg" alt="" width="114" height="118" border="0" name="titlebar-east" /></a></td>
35      </tr>
36    </tbody>
37  </table>
38
39  <table style="width: 100%" border="0" cellpadding="0" cellspacing="0" summary="">
40  <tbody>
41
42    <tr valign="top" style="height: 100%;">
43      <td id="menu" width="1%" height="100%">
44      <p><a href="#main">Skip to page contents</a></p>
45       <font size="-1">
46      <span>[</span>
47      <a href="../../index.html">About the<br />Wizard's Toolkit</a>
48  <span>]</span><br /><span>[</span>
49      <a href="../../www/command-line-tools.html">Command-line Tools</a>
50  <span>]</span><br /><span>[</span>
51      <a href="../../www/api.html">Application Program<br />Interface</a>
52  <span>]</span><br /><span>[</span>
53      <a href="../../www/install-source.html">Install from Source</a>
54      <a href="../../www/install-source.html#unix" class="sub">Unix</a>
55      <a href="../../www/install-source.html#windows" class="sub">Windows</a>
56      <a href="../../www/binary-releases.html">Binary Releases</a>
57      <a href="../../www/binary-releases.html#unix" class="sub">Unix</a>
58      <a href="../../www/binary-releases.html#windows" class="sub">Windows</a>
59  <span>]</span><br /><span>[</span>
60      <a href="../../www/download.html">Download</a>
61  <span>]</span><br /><span>[</span>
62<div class="menu">
63  <a href="../../www/sponsors.html">Sponsors:</a>
64
65<div class="sponsbox">
66<div  class="sponsor">
67  <a href="http://www.tomsgutscheine.de">Tom's Gutscheine</a><!-- 201005010360 invendio.de-->
68</div>
69</div>
70</div>
71      <span>]</span>
72      </font>
73      </td>
74
75      <td id="main" valign="top">
76<p class="navigation-index">[<a href="#AcquireCipherInfo">AcquireCipherInfo</a> &bull; <a href="#DecipherCipher">DecipherCipher</a> &bull; <a href="#DestroyCipherInfo">DestroyCipherInfo</a> &bull; <a href="#EncipherCipher">EncipherCipher</a> &bull; <a href="#GetCipherBlocksize">GetCipherBlocksize</a> &bull; <a href="#GenerateCipherNonce">GenerateCipherNonce</a> &bull; <a href="#GetCipherNonce">GetCipherNonce</a> &bull; <a href="#ResetCipherNonce">ResetCipherNonce</a> &bull; <a href="#SetCipherNonce">SetCipherNonce</a> &bull; <a href="#SetCipherKey">SetCipherKey</a>]</p>
77
78<h2><a href="http://www.wizards-toolkit.org/api/WizardsToolkit/cipher
79_8c.html" target="source" name="AcquireCipherInfo">AcquireCipherInfo</a></h2>
80<div class="doc-section">
81
82<p>AcquireCipherInfo() allocates the CipherInfo structure.</p></ol>
83
84<p>The format of the AcquireCipherInfo method is:</p>
85
86<pre class="code">
87  CipherInfo *AcquireCipherInfo(const CipherType cipher,
88    const CipherMode mode)
89</pre>
90
91<p>A description of each parameter follows:</p></ol>
92
93<h5>cipher</h5>
94<ol><p>The cipher type.</p></ol>
95
96<h5>mode</h5>
97<ol><p>The cipher mode.</p></ol>
98
99 </div>
100<h2><a href="http://www.wizards-toolkit.org/api/WizardsToolkit/cipher
101_8c.html" target="source" name="DecipherCipher">DecipherCipher</a></h2>
102<div class="doc-section">
103
104<p>DecipherCipher() deciphers ciphertext and returns plaintext. The deciphering is performed in-place and DecipherCipher() returns a pointer to the ciphertext string.</p></ol>
105
106<p>The format of the DecipherCipher method is:</p>
107
108<pre class="code">
109       StringInfo *DecipherCipher(CipherInfo *cipher_info,StringInfo *ciphertext)
110</pre>
111
112<p>A description of each parameter follows:</p></ol>
113
114<h5>cipher_info</h5>
115<ol><p>The cipher context.</p></ol>
116
117<h5>ciphertext</h5>
118<ol><p>The cipher text.</p></ol>
119
120 </div>
121<h2><a href="http://www.wizards-toolkit.org/api/WizardsToolkit/cipher
122_8c.html" target="source" name="DestroyCipherInfo">DestroyCipherInfo</a></h2>
123<div class="doc-section">
124
125<p>DestroyCipherInfo() zeros memory associated with the CipherInfo structure.</p></ol>
126
127<p>The format of the DestroyCipherInfo method is:</p>
128
129<pre class="code">
130  CipherInfo *DestroyCipherInfo(CipherInfo *cipher_info)
131</pre>
132
133<p>A description of each parameter follows:</p></ol>
134
135<h5>cipher_info</h5>
136<ol><p>The cipher info.</p></ol>
137
138 </div>
139<h2><a href="http://www.wizards-toolkit.org/api/WizardsToolkit/cipher
140_8c.html" target="source" name="EncipherCipher">EncipherCipher</a></h2>
141<div class="doc-section">
142
143<p>EncipherCipher() enciphers plaintext and returns ciphertext.  The enciphering is performed in-place and EncipherCipher() returns a pointer to the plaintext string.</p></ol>
144
145<p>The format of the EncipherCipher method is:</p>
146
147<pre class="code">
148       StringInfo *EncipherCipher(CipherInfo *cipher_info,StringInfo *plaintext)
149</pre>
150
151<p>A description of each parameter follows:</p></ol>
152
153<h5>cipher_info</h5>
154<ol><p>The cipher context.</p></ol>
155
156<h5>plaintext</h5>
157<ol><p>The plain text.</p></ol>
158
159 </div>
160<h2><a href="http://www.wizards-toolkit.org/api/WizardsToolkit/cipher
161_8c.html" target="source" name="GetCipherBlocksize">GetCipherBlocksize</a></h2>
162<div class="doc-section">
163
164<p>GetCipherBlocksize() returns the cipher blocksize.</p></ol>
165
166<p>The format of the GetCipherBlocksize method is:</p>
167
168<pre class="code">
169  size_t GetCipherBlocksize(const CipherInfo *cipher_info)
170</pre>
171
172<p>A description of each parameter follows:</p></ol>
173
174<h5>cipher_info</h5>
175<ol><p>The cipher info.</p></ol>
176
177 </div>
178<h2><a href="http://www.wizards-toolkit.org/api/WizardsToolkit/cipher
179_8c.html" target="source" name="GenerateCipherNonce">GenerateCipherNonce</a></h2>
180<div class="doc-section">
181
182<p>GenerateCipherNonce() generate a nonce for the given cipher.</p></ol>
183
184<p>The format of the GenerateCipherNonce method is:</p>
185
186<pre class="code">
187       StringInfo *GenerateCipherNonce(CipherInfo *cipher_info)
188</pre>
189
190<p>A description of each parameter follows:</p></ol>
191
192<h5>cipher_info</h5>
193<ol><p>The cipher context.</p></ol>
194
195 </div>
196<h2><a href="http://www.wizards-toolkit.org/api/WizardsToolkit/cipher
197_8c.html" target="source" name="GetCipherNonce">GetCipherNonce</a></h2>
198<div class="doc-section">
199
200<p>GetCipherNonce() returns a nonce of the cipher.</p></ol>
201
202<p>The format of the GetCipherNonce method is:</p>
203
204<pre class="code">
205       const StringInfo *GetCipherNonce(CipherInfo *cipher_info)
206</pre>
207
208<p>A description of each parameter follows:</p></ol>
209
210<h5>cipher_info</h5>
211<ol><p>The cipher context.</p></ol>
212
213 </div>
214<h2><a href="http://www.wizards-toolkit.org/api/WizardsToolkit/cipher
215_8c.html" target="source" name="ResetCipherNonce">ResetCipherNonce</a></h2>
216<div class="doc-section">
217
218<p>ResetCipherNonce() resets the initialization vector for the cipher.</p></ol>
219
220<p>The format of the ResetCipherNonce method is:</p>
221
222<pre class="code">
223  ResetCipherNonce(CipherInfo *cipher_info)
224</pre>
225
226<p>A description of each parameter follows:</p></ol>
227
228<h5>cipher_info</h5>
229<ol><p>The cipher context.</p></ol>
230
231 </div>
232<h2><a href="http://www.wizards-toolkit.org/api/WizardsToolkit/cipher
233_8c.html" target="source" name="SetCipherNonce">SetCipherNonce</a></h2>
234<div class="doc-section">
235
236<p>SetCipherNonce() sets the initialization vector for the cipher.</p></ol>
237
238<p>The format of the SetCipherNonce method is:</p>
239
240<pre class="code">
241  SetCipherNonce(CipherInfo *cipher_info,const StringInfo *nonce)
242</pre>
243
244<p>A description of each parameter follows:</p></ol>
245
246<h5>cipher_info</h5>
247<ol><p>The cipher context.</p></ol>
248
249<h5>nonce</h5>
250<ol><p>The initialization vector.</p></ol>
251
252 </div>
253<h2><a href="http://www.wizards-toolkit.org/api/WizardsToolkit/cipher
254_8c.html" target="source" name="SetCipherKey">SetCipherKey</a></h2>
255<div class="doc-section">
256
257<p>SetCipherKey() sets the key for the cipher.  The key length is specified in bits.  Valid values are 128, 192, or 256.</p></ol>
258
259<p>The format of the SetCipherKey method is:</p>
260
261<pre class="code">
262  SetCipherKey(CipherInfo *cipher_info,const StringInfo *key)
263</pre>
264
265<p>A description of each parameter follows:</p></ol>
266
267<h5>cipher_info</h5>
268<ol><p>The cipher context.</p></ol>
269
270<h5>key</h5>
271<ol><p>The key.</p></ol>
272
273 </div>
274      </td>
275      <td id="margin" width="1%" height="100%" valign="top" align="right">&nbsp;</td>
276    </tr>
277  </tbody>
278  </table>
279  <div id="linkbar">
280    <a href="http://www.wizards-toolkit.org/discourse-server/viewforum.html?f=17" target="457333743">Discourse Server</a> |
281    <a href="../../www/license.html">License</a> |
282    <a href="../../www/notice.html">Notice</a>
283  </div>
284  <div id="footer">
285    <span id="footer-west">&copy; 1999-2009 ImageMagick Studio LLC</span>
286  </div>
287  <div style="clear: both; margin: 0; width: 100%; "></div>
288</body>
289</html>
Note: See TracBrowser for help on using the browser.