blob: 907dea12261145047ba50f7eee21a6dfb009ef73 [file] [log] [blame]
Cristy594d2772015-11-15 10:47:42 -05001
2
3
4
cristy29dc8652015-05-12 16:26:21 +00005<!DOCTYPE html>
cristy44443b92015-05-05 00:06:07 +00006<html lang="en">
cristy06f63f22012-10-31 00:50:07 +00007<head>
Cristy594d2772015-11-15 10:47:42 -05008 <meta name="google-site-verification" content="_bMOCDpkx9ZAzBwb2kF3PRHbfUUdFj2uO8Jd1AXArz4" />
cristy29f2c972015-07-28 13:37:46 +00009 <title>ImageMagick: MagickCore, C API for ImageMagick: Convert to and from Cipher Pixels</title>
Cristy594d2772015-11-15 10:47:42 -050010 <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
11 <meta name="application-name" content="ImageMagick"/>
12 <meta name="description" content="ImageMagick® is a software suite to create, edit, compose, or convert bitmap images. It can read and write images in a variety of formats (over 200) including PNG, JPEG, JPEG-2000, GIF, WebP, Postscript, PDF, and SVG. Use ImageMagick to resize, flip, mirror, rotate, distort, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves."/>
13 <meta name="application-url" content="http://www.imagemagick.org"/>
14 <meta name="generator" content="PHP"/>
15 <meta name="keywords" content="magickcore, c, api, for, imagemagick:, 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"/>
Cristyce4a3552015-12-14 13:53:35 -050022 <meta name="copyright" content="Copyright (c) 1999-2015 ImageMagick Studio LLC"/>
Cristy594d2772015-11-15 10:47:42 -050023 <meta name="distribution" content="Global"/>
24 <meta name="magick-serial" content="P131-S030410-R485315270133-P82224-A6668-G1245-1"/>
25 <link rel="icon" href="../images/wand.png"/>
26 <link rel="shortcut icon" href="../images/wand.ico"/>
27 <link rel="stylesheet" href="../css/magick.html"/>
cristy06f63f22012-10-31 00:50:07 +000028</head>
cristy44443b92015-05-05 00:06:07 +000029<body>
cristy06f63f22012-10-31 00:50:07 +000030<div class="main">
cristy44443b92015-05-05 00:06:07 +000031<div class="magick-masthead">
32 <div class="container">
Cristye93be682015-11-26 09:07:51 -050033 <script async="async" src="http://localhost/pagead/js/adsbygoogle.js"></script> <ins class="adsbygoogle"
Cristy594d2772015-11-15 10:47:42 -050034 style="display:block"
35 data-ad-client="ca-pub-3129977114552745"
36 data-ad-slot="6345125851"
37 data-ad-format="auto"></ins>
cristy29f2c972015-07-28 13:37:46 +000038 <script>
Cristy542697a2015-10-12 20:10:32 -040039 (adsbygoogle = window.adsbygoogle || []).push({});
cristy44443b92015-05-05 00:06:07 +000040 </script>
cristy44443b92015-05-05 00:06:07 +000041 <nav class="magick-nav">
cristy2f563d42015-05-06 23:36:51 +000042 <a class="magick-nav-item " href="../index.html">Home</a>
cristyea2793e2015-05-31 16:52:26 +000043 <a class="magick-nav-item " href="../binary-releases.html">Download</a>
cristy38185362015-05-07 20:09:56 +000044 <a class="magick-nav-item " href="../command-line-tools.html">Tools</a>
Cristye93be682015-11-26 09:07:51 -050045 <a class="magick-nav-item " href="../command-line-processing.html">Command-line</a>
cristyea2793e2015-05-31 16:52:26 +000046 <a class="magick-nav-item " href="../resources.html">Resources</a>
47 <a class="magick-nav-item " href="api.html">Develop</a>
cristy5b8fe762015-06-09 16:24:03 +000048 <a class="magick-nav-item " href="http://nextgen.imagemagick.org/script/search.php">Search</a>
cristya1890f02015-05-15 23:32:44 +000049 <a class="magick-nav-item pull-right" href="http://www.imagemagick.org/discourse-server/">Community</a>
cristy44443b92015-05-05 00:06:07 +000050 </nav>
51 </div>
52</div>
53<div class="container">
cristy4e638cd2015-05-07 16:47:40 +000054<div class="magick-header">
Cristy594d2772015-11-15 10:47:42 -050055<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>
cristy06f63f22012-10-31 00:50:07 +000056
Cristye93be682015-11-26 09:07:51 -050057<h2><a href="http://www.imagemagick.org/api/MagickCore/cipher_8c.html" id="AcquireAESInfo">AcquireAESInfo</a></h2>
cristycecc9492015-06-09 16:53:50 +000058
59<p>AcquireAESInfo() allocate the AESInfo structure.</p>
60
61<p>The format of the AcquireAESInfo method is:</p>
62
63<pre class="text">
64AESInfo *AcquireAESInfo(void)
65</pre>
66
Cristye93be682015-11-26 09:07:51 -050067<h2><a href="http://www.imagemagick.org/api/MagickCore/cipher_8c.html" id="DestroyAESInfo">DestroyAESInfo</a></h2>
cristycecc9492015-06-09 16:53:50 +000068
69<p>DestroyAESInfo() zeros memory associated with the AESInfo structure.</p>
70
71<p>The format of the DestroyAESInfo method is:</p>
72
73<pre class="text">
74AESInfo *DestroyAESInfo(AESInfo *aes_info)
75</pre>
76
77<p>A description of each parameter follows:</p>
78
79<dd>
80</dd>
81
82<dd> </dd>
83<dl class="dl-horizontal">
84<dt>aes_info</dt>
85<dd>the cipher context. </dd>
86
87<dd> </dd>
88</dl>
Cristye93be682015-11-26 09:07:51 -050089<h2><a href="http://www.imagemagick.org/api/MagickCore/cipher_8c.html" id="EncipherAESBlock">EncipherAESBlock</a></h2>
cristycecc9492015-06-09 16:53:50 +000090
91<p>EncipherAESBlock() enciphers a single block of plaintext to produce a block of ciphertext.</p>
92
93<p>The format of the EncipherAESBlock method is:</p>
94
95<pre class="text">
96void EncipherAES(AESInfo *aes_info,const unsigned char *plaintext,
97 unsigned char *ciphertext)
98</pre>
99
100<p>A description of each parameter follows:</p>
101
102<dd>
103</dd>
104
105<dd> </dd>
106<dl class="dl-horizontal">
107<dt>aes_info</dt>
108<dd>the cipher context. </dd>
109
110<dd> </dd>
111<dt>plaintext</dt>
112<dd>the plain text. </dd>
113
114<dd> </dd>
115<dt>ciphertext</dt>
116<dd>the cipher text. </dd>
117
118<dd> </dd>
119</dl>
Cristye93be682015-11-26 09:07:51 -0500120<h2><a href="http://www.imagemagick.org/api/MagickCore/cipher_8c.html" id="PasskeyDecipherImage">PasskeyDecipherImage</a></h2>
cristycecc9492015-06-09 16:53:50 +0000121
122<p>PasskeyDecipherImage() converts cipher pixels to plain pixels.</p>
123
124<p>The format of the PasskeyDecipherImage method is:</p>
125
126<pre class="text">
127MagickBooleanType PasskeyDecipherImage(Image *image,
128 const StringInfo *passkey,ExceptionInfo *exception)
129MagickBooleanType DecipherImage(Image *image,const char *passphrase,
130 ExceptionInfo *exception)
131</pre>
132
133<p>A description of each parameter follows:</p>
134
135<dd>
136</dd>
137
138<dd> </dd>
139<dl class="dl-horizontal">
140<dt>image</dt>
141<dd>the image. </dd>
142
143<dd> </dd>
144<dt>passphrase</dt>
145<dd>decipher cipher pixels with this passphrase. </dd>
146
147<dd> </dd>
148<dt>passkey</dt>
149<dd>decrypt cipher pixels with this passkey. </dd>
150
151<dd> </dd>
152<dt>exception</dt>
153<dd>return any errors or warnings in this structure. </dd>
154
155<dd> </dd>
156</dl>
Cristye93be682015-11-26 09:07:51 -0500157<h2><a href="http://www.imagemagick.org/api/MagickCore/cipher_8c.html" id="PasskeyEncipherImage">PasskeyEncipherImage</a></h2>
cristycecc9492015-06-09 16:53:50 +0000158
159<p>PasskeyEncipherImage() converts pixels to cipher-pixels.</p>
160
161<p>The format of the PasskeyEncipherImage method is:</p>
162
163<pre class="text">
164MagickBooleanType PasskeyEncipherImage(Image *image,
165 const StringInfo *passkey,ExceptionInfo *exception)
166MagickBooleanType EncipherImage(Image *image,const char *passphrase,
167 ExceptionInfo *exception)
168</pre>
169
170<p>A description of each parameter follows:</p>
171
172<dd>
173</dd>
174
175<dd> </dd>
176<dl class="dl-horizontal">
177<dt>image</dt>
178<dd>the image. </dd>
179
180<dd> </dd>
181<dt>passphrase</dt>
182<dd>encipher pixels with this passphrase. </dd>
183
184<dd> </dd>
185<dt>passkey</dt>
186<dd>decrypt cipher pixels with this passkey. </dd>
187
188<dd> </dd>
189<dt>exception</dt>
190<dd>return any errors or warnings in this structure. </dd>
191
192<dd> </dd>
193</dl>
Cristye93be682015-11-26 09:07:51 -0500194<h2><a href="http://www.imagemagick.org/api/MagickCore/cipher_8c.html" id="SetAESKey">SetAESKey</a></h2>
cristycecc9492015-06-09 16:53:50 +0000195
196<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>
197
198<p>The format of the SetAESKey method is:</p>
199
200<pre class="text">
201SetAESKey(AESInfo *aes_info,const StringInfo *key)
202</pre>
203
204<p>A description of each parameter follows:</p>
205
206<dd>
207</dd>
208
209<dd> </dd>
210<dl class="dl-horizontal">
211<dt>aes_info</dt>
212<dd>the cipher context. </dd>
213
214<dd> </dd>
215<dt>key</dt>
216<dd>the key. </dd>
217
218<dd> </dd>
219</dl>
Cristye93be682015-11-26 09:07:51 -0500220<h2><a href="http://www.imagemagick.org/api/MagickCore/cipher_8c.html" id="PasskeyDecipherImage">PasskeyDecipherImage</a></h2>
cristycecc9492015-06-09 16:53:50 +0000221
222<p>PasskeyDecipherImage() converts cipher pixels to plain pixels.</p>
223
224<p>The format of the PasskeyDecipherImage method is:</p>
225
226<pre class="text">
227MagickBooleanType PasskeyDecipherImage(Image *image,
228 const StringInfo *passkey,ExceptionInfo *exception)
229MagickBooleanType DecipherImage(Image *image,const char *passphrase,
230 ExceptionInfo *exception)
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>image</dt>
241<dd>the image. </dd>
242
243<dd> </dd>
244<dt>passphrase</dt>
245<dd>decipher cipher pixels with this passphrase. </dd>
246
247<dd> </dd>
248<dt>passkey</dt>
249<dd>decrypt cipher pixels with this passkey. </dd>
250
251<dd> </dd>
252<dt>exception</dt>
253<dd>return any errors or warnings in this structure. </dd>
254
255<dd> </dd>
256</dl>
Cristye93be682015-11-26 09:07:51 -0500257<h2><a href="http://www.imagemagick.org/api/MagickCore/cipher_8c.html" id="PasskeyEncipherImage">PasskeyEncipherImage</a></h2>
cristycecc9492015-06-09 16:53:50 +0000258
259<p>PasskeyEncipherImage() converts pixels to cipher-pixels.</p>
260
261<p>The format of the PasskeyEncipherImage method is:</p>
262
263<pre class="text">
264MagickBooleanType PasskeyEncipherImage(Image *image,
265 const StringInfo *passkey,ExceptionInfo *exception)
266MagickBooleanType EncipherImage(Image *image,const char *passphrase,
267 ExceptionInfo *exception)
268</pre>
269
270<p>A description of each parameter follows:</p>
271
272<dd>
273</dd>
274
275<dd> </dd>
276<dl class="dl-horizontal">
277<dt>passphrase</dt>
278<dd>decipher cipher pixels with this passphrase. </dd>
279
280<dd> </dd>
281<dt>passkey</dt>
282<dd>decrypt cipher pixels with this passkey. </dd>
283
284<dd> </dd>
285<dt>exception</dt>
286<dd>return any errors or warnings in this structure. </dd>
287
288<dd> </dd>
289</dl>
cristy06f63f22012-10-31 00:50:07 +0000290</div>
cristy44443b92015-05-05 00:06:07 +0000291 <footer class="magick-footer">
cristy29f2c972015-07-28 13:37:46 +0000292 <p><a href="../support.html">Donate</a>
293 <a href="../sitemap.html">Sitemap</a>
cristy38185362015-05-07 20:09:56 +0000294 <a href="../links.html">Related</a>
cristy29f2c972015-07-28 13:37:46 +0000295 <a href="../architecture.html">Architecture</a>
cristy44443b92015-05-05 00:06:07 +0000296</p>
297 <p><a href="cipher.html#">Back to top</a>
cristyea2793e2015-05-31 16:52:26 +0000298 <a href="http://pgp.mit.edu:11371/pks/lookup?op=get&amp;search=0x89AB63D48277377A">Public Key</a>
cristy5b8fe762015-06-09 16:24:03 +0000299 <a href="http://nextgen.imagemagick.org/script/contact.php">Contact Us</a></p>
Cristyce4a3552015-12-14 13:53:35 -0500300 <p><small>© 1999-2015 ImageMagick Studio LLC</small></p>
cristy44443b92015-05-05 00:06:07 +0000301 </footer>
302</div><!-- /.container -->
cristy06f63f22012-10-31 00:50:07 +0000303
Cristye93be682015-11-26 09:07:51 -0500304 <script src="https://localhost/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
cristy29f2c972015-07-28 13:37:46 +0000305 <script src="http://nextgen.imagemagick.org/js/magick.html"></script>
cristy44cbd482013-08-04 20:53:36 +0000306</div>
cristy06f63f22012-10-31 00:50:07 +0000307</body>
cristy5a367e42015-05-05 12:39:18 +0000308</html>