Cristy | 594d277 | 2015-11-15 10:47:42 -0500 | [diff] [blame] | 1 | |
| 2 | |
| 3 | |
| 4 | |
cristy | 29dc865 | 2015-05-12 16:26:21 +0000 | [diff] [blame] | 5 | <!DOCTYPE html> |
cristy | 44443b9 | 2015-05-05 00:06:07 +0000 | [diff] [blame] | 6 | <html lang="en"> |
cristy | 06f63f2 | 2012-10-31 00:50:07 +0000 | [diff] [blame] | 7 | <head> |
Cristy | 594d277 | 2015-11-15 10:47:42 -0500 | [diff] [blame] | 8 | <meta name="google-site-verification" content="_bMOCDpkx9ZAzBwb2kF3PRHbfUUdFj2uO8Jd1AXArz4" /> |
cristy | 29f2c97 | 2015-07-28 13:37:46 +0000 | [diff] [blame] | 9 | <title>ImageMagick: MagickCore, C API for ImageMagick: Convert to and from Cipher Pixels</title> |
Cristy | 594d277 | 2015-11-15 10:47:42 -0500 | [diff] [blame] | 10 | <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"/> |
Cristy | ce4a355 | 2015-12-14 13:53:35 -0500 | [diff] [blame] | 22 | <meta name="copyright" content="Copyright (c) 1999-2015 ImageMagick Studio LLC"/> |
Cristy | 594d277 | 2015-11-15 10:47:42 -0500 | [diff] [blame] | 23 | <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"/> |
cristy | 06f63f2 | 2012-10-31 00:50:07 +0000 | [diff] [blame] | 28 | </head> |
cristy | 44443b9 | 2015-05-05 00:06:07 +0000 | [diff] [blame] | 29 | <body> |
cristy | 06f63f2 | 2012-10-31 00:50:07 +0000 | [diff] [blame] | 30 | <div class="main"> |
cristy | 44443b9 | 2015-05-05 00:06:07 +0000 | [diff] [blame] | 31 | <div class="magick-masthead"> |
| 32 | <div class="container"> |
Cristy | e93be68 | 2015-11-26 09:07:51 -0500 | [diff] [blame] | 33 | <script async="async" src="http://localhost/pagead/js/adsbygoogle.js"></script> <ins class="adsbygoogle" |
Cristy | 594d277 | 2015-11-15 10:47:42 -0500 | [diff] [blame] | 34 | style="display:block" |
| 35 | data-ad-client="ca-pub-3129977114552745" |
| 36 | data-ad-slot="6345125851" |
| 37 | data-ad-format="auto"></ins> |
cristy | 29f2c97 | 2015-07-28 13:37:46 +0000 | [diff] [blame] | 38 | <script> |
Cristy | 542697a | 2015-10-12 20:10:32 -0400 | [diff] [blame] | 39 | (adsbygoogle = window.adsbygoogle || []).push({}); |
cristy | 44443b9 | 2015-05-05 00:06:07 +0000 | [diff] [blame] | 40 | </script> |
cristy | 44443b9 | 2015-05-05 00:06:07 +0000 | [diff] [blame] | 41 | <nav class="magick-nav"> |
cristy | 2f563d4 | 2015-05-06 23:36:51 +0000 | [diff] [blame] | 42 | <a class="magick-nav-item " href="../index.html">Home</a> |
cristy | ea2793e | 2015-05-31 16:52:26 +0000 | [diff] [blame] | 43 | <a class="magick-nav-item " href="../binary-releases.html">Download</a> |
cristy | 3818536 | 2015-05-07 20:09:56 +0000 | [diff] [blame] | 44 | <a class="magick-nav-item " href="../command-line-tools.html">Tools</a> |
Cristy | e93be68 | 2015-11-26 09:07:51 -0500 | [diff] [blame] | 45 | <a class="magick-nav-item " href="../command-line-processing.html">Command-line</a> |
cristy | ea2793e | 2015-05-31 16:52:26 +0000 | [diff] [blame] | 46 | <a class="magick-nav-item " href="../resources.html">Resources</a> |
| 47 | <a class="magick-nav-item " href="api.html">Develop</a> |
cristy | 5b8fe76 | 2015-06-09 16:24:03 +0000 | [diff] [blame] | 48 | <a class="magick-nav-item " href="http://nextgen.imagemagick.org/script/search.php">Search</a> |
cristy | a1890f0 | 2015-05-15 23:32:44 +0000 | [diff] [blame] | 49 | <a class="magick-nav-item pull-right" href="http://www.imagemagick.org/discourse-server/">Community</a> |
cristy | 44443b9 | 2015-05-05 00:06:07 +0000 | [diff] [blame] | 50 | </nav> |
| 51 | </div> |
| 52 | </div> |
| 53 | <div class="container"> |
cristy | 4e638cd | 2015-05-07 16:47:40 +0000 | [diff] [blame] | 54 | <div class="magick-header"> |
Cristy | 594d277 | 2015-11-15 10:47:42 -0500 | [diff] [blame] | 55 | <p class="text-center"><a href="cipher.html#AcquireAESInfo">AcquireAESInfo</a> • <a href="cipher.html#DestroyAESInfo">DestroyAESInfo</a> • <a href="cipher.html#EncipherAESBlock">EncipherAESBlock</a> • <a href="cipher.html#PasskeyDecipherImage">PasskeyDecipherImage</a> • <a href="cipher.html#PasskeyEncipherImage">PasskeyEncipherImage</a> • <a href="cipher.html#SetAESKey">SetAESKey</a> • <a href="cipher.html#PasskeyDecipherImage">PasskeyDecipherImage</a> • <a href="cipher.html#PasskeyEncipherImage">PasskeyEncipherImage</a></p> |
cristy | 06f63f2 | 2012-10-31 00:50:07 +0000 | [diff] [blame] | 56 | |
Cristy | e93be68 | 2015-11-26 09:07:51 -0500 | [diff] [blame] | 57 | <h2><a href="http://www.imagemagick.org/api/MagickCore/cipher_8c.html" id="AcquireAESInfo">AcquireAESInfo</a></h2> |
cristy | cecc949 | 2015-06-09 16:53:50 +0000 | [diff] [blame] | 58 | |
| 59 | <p>AcquireAESInfo() allocate the AESInfo structure.</p> |
| 60 | |
| 61 | <p>The format of the AcquireAESInfo method is:</p> |
| 62 | |
| 63 | <pre class="text"> |
| 64 | AESInfo *AcquireAESInfo(void) |
| 65 | </pre> |
| 66 | |
Cristy | e93be68 | 2015-11-26 09:07:51 -0500 | [diff] [blame] | 67 | <h2><a href="http://www.imagemagick.org/api/MagickCore/cipher_8c.html" id="DestroyAESInfo">DestroyAESInfo</a></h2> |
cristy | cecc949 | 2015-06-09 16:53:50 +0000 | [diff] [blame] | 68 | |
| 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"> |
| 74 | AESInfo *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> |
Cristy | e93be68 | 2015-11-26 09:07:51 -0500 | [diff] [blame] | 89 | <h2><a href="http://www.imagemagick.org/api/MagickCore/cipher_8c.html" id="EncipherAESBlock">EncipherAESBlock</a></h2> |
cristy | cecc949 | 2015-06-09 16:53:50 +0000 | [diff] [blame] | 90 | |
| 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"> |
| 96 | void 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> |
Cristy | e93be68 | 2015-11-26 09:07:51 -0500 | [diff] [blame] | 120 | <h2><a href="http://www.imagemagick.org/api/MagickCore/cipher_8c.html" id="PasskeyDecipherImage">PasskeyDecipherImage</a></h2> |
cristy | cecc949 | 2015-06-09 16:53:50 +0000 | [diff] [blame] | 121 | |
| 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"> |
| 127 | MagickBooleanType PasskeyDecipherImage(Image *image, |
| 128 | const StringInfo *passkey,ExceptionInfo *exception) |
| 129 | MagickBooleanType 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> |
Cristy | e93be68 | 2015-11-26 09:07:51 -0500 | [diff] [blame] | 157 | <h2><a href="http://www.imagemagick.org/api/MagickCore/cipher_8c.html" id="PasskeyEncipherImage">PasskeyEncipherImage</a></h2> |
cristy | cecc949 | 2015-06-09 16:53:50 +0000 | [diff] [blame] | 158 | |
| 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"> |
| 164 | MagickBooleanType PasskeyEncipherImage(Image *image, |
| 165 | const StringInfo *passkey,ExceptionInfo *exception) |
| 166 | MagickBooleanType 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> |
Cristy | e93be68 | 2015-11-26 09:07:51 -0500 | [diff] [blame] | 194 | <h2><a href="http://www.imagemagick.org/api/MagickCore/cipher_8c.html" id="SetAESKey">SetAESKey</a></h2> |
cristy | cecc949 | 2015-06-09 16:53:50 +0000 | [diff] [blame] | 195 | |
| 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"> |
| 201 | SetAESKey(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> |
Cristy | e93be68 | 2015-11-26 09:07:51 -0500 | [diff] [blame] | 220 | <h2><a href="http://www.imagemagick.org/api/MagickCore/cipher_8c.html" id="PasskeyDecipherImage">PasskeyDecipherImage</a></h2> |
cristy | cecc949 | 2015-06-09 16:53:50 +0000 | [diff] [blame] | 221 | |
| 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"> |
| 227 | MagickBooleanType PasskeyDecipherImage(Image *image, |
| 228 | const StringInfo *passkey,ExceptionInfo *exception) |
| 229 | MagickBooleanType 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> |
Cristy | e93be68 | 2015-11-26 09:07:51 -0500 | [diff] [blame] | 257 | <h2><a href="http://www.imagemagick.org/api/MagickCore/cipher_8c.html" id="PasskeyEncipherImage">PasskeyEncipherImage</a></h2> |
cristy | cecc949 | 2015-06-09 16:53:50 +0000 | [diff] [blame] | 258 | |
| 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"> |
| 264 | MagickBooleanType PasskeyEncipherImage(Image *image, |
| 265 | const StringInfo *passkey,ExceptionInfo *exception) |
| 266 | MagickBooleanType 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> |
cristy | 06f63f2 | 2012-10-31 00:50:07 +0000 | [diff] [blame] | 290 | </div> |
cristy | 44443b9 | 2015-05-05 00:06:07 +0000 | [diff] [blame] | 291 | <footer class="magick-footer"> |
cristy | 29f2c97 | 2015-07-28 13:37:46 +0000 | [diff] [blame] | 292 | <p><a href="../support.html">Donate</a> • |
| 293 | <a href="../sitemap.html">Sitemap</a> • |
cristy | 3818536 | 2015-05-07 20:09:56 +0000 | [diff] [blame] | 294 | <a href="../links.html">Related</a> • |
cristy | 29f2c97 | 2015-07-28 13:37:46 +0000 | [diff] [blame] | 295 | <a href="../architecture.html">Architecture</a> |
cristy | 44443b9 | 2015-05-05 00:06:07 +0000 | [diff] [blame] | 296 | </p> |
| 297 | <p><a href="cipher.html#">Back to top</a> • |
cristy | ea2793e | 2015-05-31 16:52:26 +0000 | [diff] [blame] | 298 | <a href="http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x89AB63D48277377A">Public Key</a> • |
cristy | 5b8fe76 | 2015-06-09 16:24:03 +0000 | [diff] [blame] | 299 | <a href="http://nextgen.imagemagick.org/script/contact.php">Contact Us</a></p> |
Cristy | ce4a355 | 2015-12-14 13:53:35 -0500 | [diff] [blame] | 300 | <p><small>© 1999-2015 ImageMagick Studio LLC</small></p> |
cristy | 44443b9 | 2015-05-05 00:06:07 +0000 | [diff] [blame] | 301 | </footer> |
| 302 | </div><!-- /.container --> |
cristy | 06f63f2 | 2012-10-31 00:50:07 +0000 | [diff] [blame] | 303 | |
Cristy | e93be68 | 2015-11-26 09:07:51 -0500 | [diff] [blame] | 304 | <script src="https://localhost/ajax/libs/jquery/1.11.3/jquery.min.js"></script> |
cristy | 29f2c97 | 2015-07-28 13:37:46 +0000 | [diff] [blame] | 305 | <script src="http://nextgen.imagemagick.org/js/magick.html"></script> |
cristy | 44cbd48 | 2013-08-04 20:53:36 +0000 | [diff] [blame] | 306 | </div> |
cristy | 06f63f2 | 2012-10-31 00:50:07 +0000 | [diff] [blame] | 307 | </body> |
cristy | 5a367e4 | 2015-05-05 12:39:18 +0000 | [diff] [blame] | 308 | </html> |