• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1
2
3
4
5<!DOCTYPE html>
6<html lang="en">
7<head>
8  <meta charset="utf-8"  />
9  <meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1,shrink-to-fit=no"  />
10  <title>MagickCore, C API: Convert to and from Cipher Pixels @ ImageMagick</title>
11  <meta name="application-name" content="ImageMagick" />
12  <meta name="description" content="Use ImageMagick® to create, edit, compose, or convert bitmap images. You can resize your image, crop it, change its shades and colors, add captions, among other operations." />
13  <meta name="application-url" content="https://imagemagick.org" />
14  <meta name="generator" content="PHP" />
15  <meta name="keywords" content="magickcore, c, api:, convert, to, from, cipher, pixels, ImageMagick, PerlMagick, image processing, image, photo, software, Magick++, OpenMP, convert" />
16  <meta name="rating" content="GENERAL" />
17  <meta name="robots" content="INDEX, FOLLOW" />
18  <meta name="generator" content="ImageMagick Studio LLC" />
19  <meta name="author" content="ImageMagick Studio LLC" />
20  <meta name="revisit-after" content="2 DAYS" />
21  <meta name="resource-type" content="document" />
22  <meta name="copyright" content="Copyright (c) 1999-2017 ImageMagick Studio LLC" />
23  <meta name="distribution" content="Global" />
24  <meta name="magick-serial" content="P131-S030410-R485315270133-P82224-A6668-G1245-1" />
25  <meta name="google-site-verification" content="_bMOCDpkx9ZAzBwb2kF3PRHbfUUdFj2uO8Jd1AXArz4" />
26  <link href="cipher.html" rel="canonical" />
27  <link href="../../images/wand.png" rel="icon" />
28  <link href="../../images/wand.ico" rel="shortcut icon" />
29  <link href="../assets/magick.css" rel="stylesheet" />
30</head>
31<body>
32  <header>
33  <nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark">
34    <a class="navbar-brand" href="../../"><img class="d-block" id="icon" alt="ImageMagick" width="32" height="32" src="../../images/wand.ico"/></a>
35    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsMagick" aria-controls="navbarsMagick" aria-expanded="false" aria-label="Toggle navigation">
36      <span class="navbar-toggler-icon"></span>
37    </button>
38
39    <div class="navbar-collapse collapse" id="navbarsMagick" style="">
40    <ul class="navbar-nav mr-auto">
41      <li class="nav-item ">
42        <a class="nav-link" href="quantize.html">Home <span class="sr-only">(current)</span></a>
43      </li>
44      <li class="nav-item ">
45        <a class="nav-link" href="../../www/download.html">Download</a>
46      </li>
47      <li class="nav-item ">
48        <a class="nav-link" href="../../www/command-line-tools.html">Tools</a>
49      </li>
50      <li class="nav-item ">
51        <a class="nav-link" href="../../www/command-line-processing.html">Command-line</a>
52      </li>
53      <li class="nav-item ">
54        <a class="nav-link" href="../../www/resources.html">Resources</a>
55      </li>
56      <li class="nav-item ">
57        <a class="nav-link" href="../../www/develop.html">Develop</a>
58      </li>
59      <li class="nav-item">
60        <a class="nav-link" target="_blank" href="https://imagemagick.org/discourse-server/">Community</a>
61      </li>
62    </ul>
63    <form class="form-inline my-2 my-lg-0" action="https://imagemagick.org/script/search.php">
64      <input class="form-control mr-sm-2" type="text" name="q" placeholder="Search" aria-label="Search">
65      <button class="btn btn-outline-success my-2 my-sm-0" type="submit" name="sa">Search</button>
66    </form>
67    </div>
68  </nav>
69  <div class="container">
70   <script async="async" src="https://localhost/pagead/js/adsbygoogle.js"></script>    <ins class="adsbygoogle"
71         style="display:block"
72         data-ad-client="ca-pub-3129977114552745"
73         data-ad-slot="6345125851"
74         data-ad-format="auto"></ins>
75    <script>
76      (adsbygoogle = window.adsbygoogle || []).push({});
77    </script>
78
79  </div>
80  </header>
81  <main class="container">
82    <div class="magick-template">
83<div class="magick-header">
84<p class="text-center"><a href="cipher.html#AcquireAESInfo">AcquireAESInfo</a> &#8226; <a href="cipher.html#DestroyAESInfo">DestroyAESInfo</a> &#8226; <a href="cipher.html#EncipherAESBlock">EncipherAESBlock</a> &#8226; <a href="cipher.html#PasskeyDecipherImage">PasskeyDecipherImage</a> &#8226; <a href="cipher.html#PasskeyEncipherImage">PasskeyEncipherImage</a> &#8226; <a href="cipher.html#SetAESKey">SetAESKey</a> &#8226; <a href="cipher.html#PasskeyDecipherImage">PasskeyDecipherImage</a> &#8226; <a href="cipher.html#PasskeyEncipherImage">PasskeyEncipherImage</a></p>
85
86<h2><a href="../../api/MagickCore/cipher_8c.html" id="AcquireAESInfo">AcquireAESInfo</a></h2>
87
88<p>AcquireAESInfo() allocate the AESInfo structure.</p>
89
90<p>The format of the AcquireAESInfo method is:</p>
91
92<pre class="text">
93AESInfo *AcquireAESInfo(void)
94</pre>
95
96<h2><a href="../../api/MagickCore/cipher_8c.html" id="DestroyAESInfo">DestroyAESInfo</a></h2>
97
98<p>DestroyAESInfo() zeros memory associated with the AESInfo structure.</p>
99
100<p>The format of the DestroyAESInfo method is:</p>
101
102<pre class="text">
103AESInfo *DestroyAESInfo(AESInfo *aes_info)
104</pre>
105
106<p>A description of each parameter follows:</p>
107
108<dd>
109</dd>
110
111<dd> </dd>
112<dl class="dl-horizontal">
113<dt>aes_info</dt>
114<dd>the cipher context. </dd>
115
116<dd>  </dd>
117</dl>
118<h2><a href="../../api/MagickCore/cipher_8c.html" id="EncipherAESBlock">EncipherAESBlock</a></h2>
119
120<p>EncipherAESBlock() enciphers a single block of plaintext to produce a block of ciphertext.</p>
121
122<p>The format of the EncipherAESBlock method is:</p>
123
124<pre class="text">
125void EncipherAES(AESInfo *aes_info,const unsigned char *plaintext,
126  unsigned char *ciphertext)
127</pre>
128
129<p>A description of each parameter follows:</p>
130
131<dd>
132</dd>
133
134<dd> </dd>
135<dl class="dl-horizontal">
136<dt>aes_info</dt>
137<dd>the cipher context. </dd>
138
139<dd> </dd>
140<dt>plaintext</dt>
141<dd>the plain text. </dd>
142
143<dd> </dd>
144<dt>ciphertext</dt>
145<dd>the cipher text. </dd>
146
147<dd>  </dd>
148</dl>
149<h2><a href="../../api/MagickCore/cipher_8c.html" id="PasskeyDecipherImage">PasskeyDecipherImage</a></h2>
150
151<p>PasskeyDecipherImage() converts cipher pixels to plain pixels.</p>
152
153<p>The format of the PasskeyDecipherImage method is:</p>
154
155<pre class="text">
156MagickBooleanType PasskeyDecipherImage(Image *image,
157  const StringInfo *passkey,ExceptionInfo *exception)
158MagickBooleanType DecipherImage(Image *image,const char *passphrase,
159  ExceptionInfo *exception)
160</pre>
161
162<p>A description of each parameter follows:</p>
163
164<dd>
165</dd>
166
167<dd> </dd>
168<dl class="dl-horizontal">
169<dt>image</dt>
170<dd>the image. </dd>
171
172<dd> </dd>
173<dt>passphrase</dt>
174<dd>decipher cipher pixels with this passphrase. </dd>
175
176<dd> </dd>
177<dt>passkey</dt>
178<dd>decrypt cipher pixels with this passkey. </dd>
179
180<dd> </dd>
181<dt>exception</dt>
182<dd>return any errors or warnings in this structure. </dd>
183
184<dd>  </dd>
185</dl>
186<h2><a href="../../api/MagickCore/cipher_8c.html" id="PasskeyEncipherImage">PasskeyEncipherImage</a></h2>
187
188<p>PasskeyEncipherImage() converts pixels to cipher-pixels.</p>
189
190<p>The format of the PasskeyEncipherImage method is:</p>
191
192<pre class="text">
193MagickBooleanType PasskeyEncipherImage(Image *image,
194  const StringInfo *passkey,ExceptionInfo *exception)
195MagickBooleanType EncipherImage(Image *image,const char *passphrase,
196  ExceptionInfo *exception)
197</pre>
198
199<p>A description of each parameter follows:</p>
200
201<dd>
202</dd>
203
204<dd> </dd>
205<dl class="dl-horizontal">
206<dt>image</dt>
207<dd>the image. </dd>
208
209<dd> </dd>
210<dt>passphrase</dt>
211<dd>encipher pixels with this passphrase. </dd>
212
213<dd> </dd>
214<dt>passkey</dt>
215<dd>decrypt cipher pixels with this passkey. </dd>
216
217<dd> </dd>
218<dt>exception</dt>
219<dd>return any errors or warnings in this structure. </dd>
220
221<dd>  </dd>
222</dl>
223<h2><a href="../../api/MagickCore/cipher_8c.html" id="SetAESKey">SetAESKey</a></h2>
224
225<p>SetAESKey() sets the key for the AES cipher.  The key length is specified in bits.  Valid values are 128, 192, or 256 requiring a key buffer length in bytes of 16, 24, and 32 respectively.</p>
226
227<p>The format of the SetAESKey method is:</p>
228
229<pre class="text">
230SetAESKey(AESInfo *aes_info,const StringInfo *key)
231</pre>
232
233<p>A description of each parameter follows:</p>
234
235<dd>
236</dd>
237
238<dd> </dd>
239<dl class="dl-horizontal">
240<dt>aes_info</dt>
241<dd>the cipher context. </dd>
242
243<dd> </dd>
244<dt>key</dt>
245<dd>the key. </dd>
246
247<dd>  </dd>
248</dl>
249<h2><a href="../../api/MagickCore/cipher_8c.html" id="PasskeyDecipherImage">PasskeyDecipherImage</a></h2>
250
251<p>PasskeyDecipherImage() converts cipher pixels to plain pixels.</p>
252
253<p>The format of the PasskeyDecipherImage method is:</p>
254
255<pre class="text">
256MagickBooleanType PasskeyDecipherImage(Image *image,
257  const StringInfo *passkey,ExceptionInfo *exception)
258MagickBooleanType DecipherImage(Image *image,const char *passphrase,
259  ExceptionInfo *exception)
260</pre>
261
262<p>A description of each parameter follows:</p>
263
264<dd>
265</dd>
266
267<dd> </dd>
268<dl class="dl-horizontal">
269<dt>image</dt>
270<dd>the image. </dd>
271
272<dd> </dd>
273<dt>passphrase</dt>
274<dd>decipher cipher pixels with this passphrase. </dd>
275
276<dd> </dd>
277<dt>passkey</dt>
278<dd>decrypt cipher pixels with this passkey. </dd>
279
280<dd> </dd>
281<dt>exception</dt>
282<dd>return any errors or warnings in this structure. </dd>
283
284<dd>  </dd>
285</dl>
286<h2><a href="../../api/MagickCore/cipher_8c.html" id="PasskeyEncipherImage">PasskeyEncipherImage</a></h2>
287
288<p>PasskeyEncipherImage() converts pixels to cipher-pixels.</p>
289
290<p>The format of the PasskeyEncipherImage method is:</p>
291
292<pre class="text">
293MagickBooleanType PasskeyEncipherImage(Image *image,
294  const StringInfo *passkey,ExceptionInfo *exception)
295MagickBooleanType EncipherImage(Image *image,const char *passphrase,
296  ExceptionInfo *exception)
297</pre>
298
299<p>A description of each parameter follows:</p>
300
301<dd>
302</dd>
303
304<dd> </dd>
305<dl class="dl-horizontal">
306<dt>passphrase</dt>
307<dd>decipher cipher pixels with this passphrase. </dd>
308
309<dd> </dd>
310<dt>passkey</dt>
311<dd>decrypt cipher pixels with this passkey. </dd>
312
313<dd> </dd>
314<dt>exception</dt>
315<dd>return any errors or warnings in this structure. </dd>
316
317<dd>  </dd>
318</dl>
319</div>
320    </div>
321  </main><!-- /.container -->
322  <footer class="magick-footer">
323    <p><a href="../../www/security-policy.html">Security</a> •
324    <a href="../../www/architecture.html">Architecture</a> •
325    <a href="../../www/links.html">Related</a> •
326     <a href="../../www/sitemap.html">Sitemap</a>
327
328    <a href="cipher.html#"><img class="d-inline" id="wand" alt="And Now a Touch of Magick" width="16" height="16" src="../../images/wand.ico"/></a>
329
330    <a href="http://pgp.mit.edu/pks/lookup?op=get&amp;search=0x89AB63D48277377A">Public Key</a> •
331    <a href="../../www/support.html">Donate</a> •
332    <a href="../../www/contact.html">Contact Us</a>
333    <br/>
334    <small>© 1999-2019 ImageMagick Studio LLC</small></p>
335  </footer>
336
337  <!-- Javascript assets -->
338  <script src="../assets/magick.js" crossorigin="anonymous"></script>
339  <script>window.jQuery || document.write('<script src="https://localhost/ajax/libs/jquery/3.3.1/jquery.min.js"><\/script>')</script>
340</body>
341</html>
342<!-- Magick Cache 29th December 2018 16:44 -->