1 2 3 4 5 <!DOCTYPE html> 6 <html lang="en"> 7 <head> 8 <meta name="google-site-verification" content="_bMOCDpkx9ZAzBwb2kF3PRHbfUUdFj2uO8Jd1AXArz4" /> 9 <title>ImageMagick: MagickCore, C API for ImageMagick: Convert to and from Cipher Pixels</title> 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 Bzier 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"/> 22 <meta name="copyright" content="Copyright (c) 1999-2016 ImageMagick Studio LLC"/> 23 <meta name="distribution" content="Global"/> 24 <meta name="magick-serial" content="P131-S030410-R485315270133-P82224-A6668-G1245-1"/> 25 <link rel="icon" href="../image/wand.png"/> 26 <link rel="shortcut icon" href="../image/wand.ico"/> 27 <link rel="stylesheet" href="../css/magick.php"/> 28 </head> 29 <body> 30 <div class="main"> 31 <div class="magick-masthead"> 32 <div class="container"> 33 <script async="async" src="http://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <ins class="adsbygoogle" 34 style="display:block" 35 data-ad-client="ca-pub-3129977114552745" 36 data-ad-slot="6345125851" 37 data-ad-format="auto"></ins> 38 <script> 39 (adsbygoogle = window.adsbygoogle || []).push({}); 40 </script> 41 <nav class="magick-nav"> 42 <a class="magick-nav-item " href="../index.php">Home</a> 43 <a class="magick-nav-item " href="../script/binary-releases.php">Download</a> 44 <a class="magick-nav-item " href="../script/command-line-tools.php">Tools</a> 45 <a class="magick-nav-item " href="../script/command-line-options.php">Options</a> 46 <a class="magick-nav-item " href="../script/resources.php">Resources</a> 47 <a class="magick-nav-item " href="../script/api.php">Develop</a> 48 <a class="magick-nav-item " href="../script/search.php">Search</a> 49 <a class="magick-nav-item pull-right" href="http://www.imagemagick.org/discourse-server/">Community</a> 50 </nav> 51 </div> 52 </div> 53 <div class="container"> 54 <div class="magick-header"> 55 <p class="text-center"><a href="cipher.php#AcquireAESInfo">AcquireAESInfo</a> • <a href="cipher.php#DestroyAESInfo">DestroyAESInfo</a> • <a href="cipher.php#EncipherAESBlock">EncipherAESBlock</a> • <a href="cipher.php#PasskeyDecipherImage">PasskeyDecipherImage</a> • <a href="cipher.php#PasskeyEncipherImage">PasskeyEncipherImage</a> • <a href="cipher.php#SetAESKey">SetAESKey</a> • <a href="cipher.php#PasskeyDecipherImage">PasskeyDecipherImage</a> • <a href="cipher.php#PasskeyEncipherImage">PasskeyEncipherImage</a></p> 56 57 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/cipher_8c.html" id="AcquireAESInfo">AcquireAESInfo</a></h2> 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 67 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/cipher_8c.html" id="DestroyAESInfo">DestroyAESInfo</a></h2> 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> 89 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/cipher_8c.html" id="EncipherAESBlock">EncipherAESBlock</a></h2> 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> 120 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/cipher_8c.html" id="PasskeyDecipherImage">PasskeyDecipherImage</a></h2> 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> 157 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/cipher_8c.html" id="PasskeyEncipherImage">PasskeyEncipherImage</a></h2> 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> 194 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/cipher_8c.html" id="SetAESKey">SetAESKey</a></h2> 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> 220 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/cipher_8c.html" id="PasskeyDecipherImage">PasskeyDecipherImage</a></h2> 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> 257 <h2><a href="http://nextgen.imagemagick.org/api/MagickCore/cipher_8c.html" id="PasskeyEncipherImage">PasskeyEncipherImage</a></h2> 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> 290 </div> 291 <footer class="magick-footer"> 292 <p><a href="../script/support.php">Donate</a> 293 <a href="../script/sitemap.php">Sitemap</a> 294 <a href="../script/links.php">Related</a> 295 <a href="../script/architecture.php">Architecture</a> 296 </p> 297 <p><a href="cipher.php#">Back to top</a> 298 <a href="http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x89AB63D48277377A">Public Key</a> 299 <a href="../script/contact.php">Contact Us</a></p> 300 <p><small> 1999-2016 ImageMagick Studio LLC</small></p> 301 </footer> 302 </div><!-- /.container --> 303 304 <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> 305 <script src="http://nextgen.imagemagick.org/js/magick.php"></script> 306 </div> 307 </body> 308 </html> 309