www/api/cipher.html
Select API Method
AcquireAESInfo() allocate the AESInfo structure.
The format of the AcquireAESInfo method is:
AESInfo \*AcquireAESInfo(void)
DestroyAESInfo() zeros memory associated with the AESInfo structure.
The format of the DestroyAESInfo method is:
AESInfo \*DestroyAESInfo(AESInfo \*aes\_info)
A description of each parameter follows:
aes_infothe cipher context.
EncipherAESBlock() enciphers a single block of plaintext to produce a block of ciphertext.
The format of the EncipherAESBlock method is:
void EncipherAES(AESInfo \*aes\_info,const unsigned char \*plaintext, unsigned char \*ciphertext)
A description of each parameter follows:
aes_infothe cipher context. plaintextthe plain text. ciphertextthe cipher text.
PasskeyDecipherImage() converts cipher pixels to plain pixels.
The format of the PasskeyDecipherImage method is:
MagickBooleanType PasskeyDecipherImage(Image \*image, const StringInfo \*passkey,ExceptionInfo \*exception) MagickBooleanType DecipherImage(Image \*image,const char \*passphrase, ExceptionInfo \*exception)
A description of each parameter follows:
imagethe image. passphrasedecipher cipher pixels with this passphrase. passkeydecrypt cipher pixels with this passkey. exceptionreturn any errors or warnings in this structure.
PasskeyEncipherImage() converts pixels to cipher-pixels.
The format of the PasskeyEncipherImage method is:
MagickBooleanType PasskeyEncipherImage(Image \*image, const StringInfo \*passkey,ExceptionInfo \*exception) MagickBooleanType EncipherImage(Image \*image,const char \*passphrase, ExceptionInfo \*exception)
A description of each parameter follows:
imagethe image. passphraseencipher pixels with this passphrase. passkeydecrypt cipher pixels with this passkey. exceptionreturn any errors or warnings in this structure.
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.
The format of the SetAESKey method is:
void SetAESKey(AESInfo \*aes\_info,const StringInfo \*key)
A description of each parameter follows:
aes_infothe cipher context. keythe key.
PasskeyDecipherImage() converts cipher pixels to plain pixels.
The format of the PasskeyDecipherImage method is:
MagickBooleanType PasskeyDecipherImage(Image \*image, const StringInfo \*passkey,ExceptionInfo \*exception) MagickBooleanType DecipherImage(Image \*image,const char \*passphrase, ExceptionInfo \*exception)
A description of each parameter follows:
imagethe image. passphrasedecipher cipher pixels with this passphrase. passkeydecrypt cipher pixels with this passkey. exceptionreturn any errors or warnings in this structure.
PasskeyEncipherImage() converts pixels to cipher-pixels.
The format of the PasskeyEncipherImage method is:
MagickBooleanType PasskeyEncipherImage(Image \*image, const StringInfo \*passkey,ExceptionInfo \*exception) MagickBooleanType EncipherImage(Image \*image,const char \*passphrase, ExceptionInfo \*exception)
A description of each parameter follows:
passphrasedecipher cipher pixels with this passphrase. passkeydecrypt cipher pixels with this passkey. exceptionreturn any errors or warnings in this structure.