% March 2003 %
% %
% %
-% Copyright 1999-2011 ImageMagick Studio LLC, a non-profit organization %
+% Copyright 1999-2012 ImageMagick Studio LLC, a non-profit organization %
% dedicated to making software imaging solutions freely available. %
% %
% You may not use this file except in compliance with the License. You may %
{
value=ciphertext[i] ^ key[i];
for (j=0; j < 4; j++)
- *p++=(value >> (8*j)) & 0xff;
+ *p++=(unsigned char) ((value >> (8*j)) & 0xff);
}
/*
Reset registers.
*/
quantum_type=GetQuantumType(image,exception);
pixels=GetQuantumPixels(quantum_info);
- image_view=AcquireCacheView(image);
+ image_view=AcquireAuthenticCacheView(image,exception);
for (y=0; y < (ssize_t) image->rows; y++)
{
register ssize_t
*restrict q;
q=GetCacheViewAuthenticPixels(image_view,0,y,image->columns,1,exception);
- if (q == (const Quantum *) NULL)
+ if (q == (Quantum *) NULL)
break;
length=ExportQuantumPixels(image,image_view,quantum_info,quantum_type,
pixels,exception);
(void) CopyMagickMemory(input_block,digest,MagickMin(AESBlocksize,
GetSignatureDigestsize(signature_info))*sizeof(*input_block));
signature=StringInfoToHexString(GetSignatureDigest(signature_info));
- (void) SetImageProperty(image,"cipher:type","AES");
- (void) SetImageProperty(image,"cipher:mode","CFB");
- (void) SetImageProperty(image,"cipher:nonce",signature);
+ (void) SetImageProperty(image,"cipher:type","AES",exception);
+ (void) SetImageProperty(image,"cipher:mode","CFB",exception);
+ (void) SetImageProperty(image,"cipher:nonce",signature,exception);
signature=DestroyString(signature);
signature_info=DestroySignatureInfo(signature_info);
/*
*/
quantum_type=GetQuantumType(image,exception);
pixels=GetQuantumPixels(quantum_info);
- image_view=AcquireCacheView(image);
+ image_view=AcquireAuthenticCacheView(image,exception);
for (y=0; y < (ssize_t) image->rows; y++)
{
register ssize_t
*restrict q;
q=GetCacheViewAuthenticPixels(image_view,0,y,image->columns,1,exception);
- if (q == (const Quantum *) NULL)
+ if (q == (Quantum *) NULL)
break;
length=ExportQuantumPixels(image,image_view,quantum_info,quantum_type,
pixels,exception);