MagickCore 7.1.0
Convert, Edit, Or Compose Bitmap Images
|
#include "MagickCore/studio.h"
#include "MagickCore/cache.h"
#include "MagickCore/exception.h"
#include "MagickCore/exception-private.h"
#include "MagickCore/property.h"
#include "MagickCore/image.h"
#include "MagickCore/memory_.h"
#include "MagickCore/memory-private.h"
#include "MagickCore/pixel-accessor.h"
#include "MagickCore/quantum.h"
#include "MagickCore/quantum-private.h"
#include "MagickCore/signature.h"
#include "MagickCore/signature-private.h"
#include "MagickCore/string_.h"
#include "MagickCore/timer-private.h"
Go to the source code of this file.
Data Structures | |
struct | _SignatureInfo |
Macros | |
#define | SignatureBlocksize 64 |
#define | SignatureDigestsize 32 |
#define | Ch(x, y, z) (((x) & (y)) ^ (~(x) & (z))) |
#define | Maj(x, y, z) (((x) & (y)) ^ ((x) & (z)) ^ ((y) & (z))) |
#define | RotateRight(x, n) (Trunc32(((x) >> n) | ((x) << (32-n)))) |
#define | Sigma0(x) (RotateRight(x,7) ^ RotateRight(x,18) ^ Trunc32((x) >> 3)) |
#define | Sigma1(x) (RotateRight(x,17) ^ RotateRight(x,19) ^ Trunc32((x) >> 10)) |
#define | Suma0(x) (RotateRight(x,2) ^ RotateRight(x,13) ^ RotateRight(x,22)) |
#define | Suma1(x) (RotateRight(x,6) ^ RotateRight(x,11) ^ RotateRight(x,25)) |
#define | Trunc32(x) ((unsigned int) ((x) & 0xffffffffU)) |
Functions | |
static void | TransformSignature (SignatureInfo *) |
MagickPrivate SignatureInfo * | AcquireSignatureInfo (void) |
MagickPrivate SignatureInfo * | DestroySignatureInfo (SignatureInfo *signature_info) |
MagickPrivate void | FinalizeSignature (SignatureInfo *signature_info) |
MagickPrivate unsigned int | GetSignatureBlocksize (const SignatureInfo *signature_info) |
MagickPrivate const StringInfo * | GetSignatureDigest (const SignatureInfo *signature_info) |
MagickPrivate unsigned int | GetSignatureDigestsize (const SignatureInfo *signature_info) |
MagickPrivate void | InitializeSignature (SignatureInfo *signature_info) |
MagickPrivate void | SetSignatureDigest (SignatureInfo *signature_info, const StringInfo *digest) |
MagickExport MagickBooleanType | SignatureImage (Image *image, ExceptionInfo *exception) |
MagickPrivate void | UpdateSignature (SignatureInfo *signature_info, const StringInfo *message) |
#define Ch | ( | x, | |
y, | |||
z | |||
) | (((x) & (y)) ^ (~(x) & (z))) |
#define Maj | ( | x, | |
y, | |||
z | |||
) | (((x) & (y)) ^ ((x) & (z)) ^ ((y) & (z))) |
#define RotateRight | ( | x, | |
n | |||
) | (Trunc32(((x) >> n) | ((x) << (32-n)))) |
#define Sigma0 | ( | x | ) | (RotateRight(x,7) ^ RotateRight(x,18) ^ Trunc32((x) >> 3)) |
#define Sigma1 | ( | x | ) | (RotateRight(x,17) ^ RotateRight(x,19) ^ Trunc32((x) >> 10)) |
#define SignatureBlocksize 64 |
Definition at line 60 of file signature.c.
#define SignatureDigestsize 32 |
Definition at line 61 of file signature.c.
#define Suma0 | ( | x | ) | (RotateRight(x,2) ^ RotateRight(x,13) ^ RotateRight(x,22)) |
#define Suma1 | ( | x | ) | (RotateRight(x,6) ^ RotateRight(x,11) ^ RotateRight(x,25)) |
#define Trunc32 | ( | x | ) | ((unsigned int) ((x) & 0xffffffffU)) |
MagickPrivate SignatureInfo * AcquireSignatureInfo | ( | void | ) |
Definition at line 118 of file signature.c.
References _SignatureInfo::accumulator, AcquireCriticalMemory(), AcquireQuantumMemory(), AcquireStringInfo(), _SignatureInfo::blocksize, _SignatureInfo::digest, _SignatureInfo::digestsize, GetMagickTime(), InitializeSignature(), _SignatureInfo::lsb_first, MagickCoreSignature, MagickFalse, MagickTrue, _SignatureInfo::message, ResourceLimitFatalError, _SignatureInfo::signature, SignatureBlocksize, SignatureDigestsize, ThrowFatalException, and _SignatureInfo::timestamp.
Referenced by SignatureImage().
MagickPrivate SignatureInfo * DestroySignatureInfo | ( | SignatureInfo * | signature_info | ) |
Definition at line 171 of file signature.c.
References _SignatureInfo::accumulator, DestroyStringInfo(), _SignatureInfo::digest, GetMagickModule, IsEventLogging(), LogMagickEvent(), MagickCoreSignature, MagickFalse, _SignatureInfo::message, RelinquishMagickMemory(), _SignatureInfo::signature, and TraceEvent.
Referenced by AcquireRandomInfo(), DestroyRandomInfo(), SignatureImage(), and StringInfoToDigest().
MagickPrivate void FinalizeSignature | ( | SignatureInfo * | signature_info | ) |
Definition at line 211 of file signature.c.
References _SignatureInfo::accumulator, _SignatureInfo::digest, GetMagickModule, GetStringInfoDatum(), GetStringInfoLength(), _SignatureInfo::high_order, IsEventLogging(), LogMagickEvent(), _SignatureInfo::low_order, MagickCoreSignature, MagickFalse, _SignatureInfo::message, _SignatureInfo::signature, SignatureDigestsize, TraceEvent, and TransformSignature().
Referenced by SignatureImage().
MagickPrivate unsigned int GetSignatureBlocksize | ( | const SignatureInfo * | signature_info | ) |
Definition at line 298 of file signature.c.
References _SignatureInfo::blocksize, GetMagickModule, IsEventLogging(), LogMagickEvent(), MagickCoreSignature, MagickFalse, _SignatureInfo::signature, and TraceEvent.
MagickPrivate const StringInfo * GetSignatureDigest | ( | const SignatureInfo * | signature_info | ) |
Definition at line 330 of file signature.c.
References _SignatureInfo::digest, GetMagickModule, IsEventLogging(), LogMagickEvent(), MagickCoreSignature, MagickFalse, _SignatureInfo::signature, and TraceEvent.
Referenced by AcquireRandomInfo(), SetRandomKey(), SignatureImage(), and StringInfoToDigest().
MagickPrivate unsigned int GetSignatureDigestsize | ( | const SignatureInfo * | signature_info | ) |
Definition at line 362 of file signature.c.
References _SignatureInfo::digestsize, GetMagickModule, IsEventLogging(), LogMagickEvent(), MagickCoreSignature, MagickFalse, _SignatureInfo::signature, and TraceEvent.
Referenced by AcquireRandomInfo(), and SetRandomKey().
MagickPrivate void InitializeSignature | ( | SignatureInfo * | signature_info | ) |
Definition at line 394 of file signature.c.
References _SignatureInfo::accumulator, _SignatureInfo::extent, GetMagickModule, _SignatureInfo::high_order, IsEventLogging(), LogMagickEvent(), _SignatureInfo::low_order, MagickCoreSignature, MagickFalse, _SignatureInfo::signature, and TraceEvent.
Referenced by AcquireSignatureInfo().
MagickPrivate void SetSignatureDigest | ( | SignatureInfo * | signature_info, |
const StringInfo * | digest | ||
) |
Definition at line 438 of file signature.c.
References _SignatureInfo::digest, MagickCoreSignature, SetStringInfo(), and _SignatureInfo::signature.
MagickExport MagickBooleanType SignatureImage | ( | Image * | image, |
ExceptionInfo * | exception | ||
) |
Definition at line 476 of file signature.c.
References AcquireSignatureInfo(), AcquireStringInfo(), AcquireVirtualCacheView(), _Image::columns, DeleteImageProperty(), DestroyCacheView(), DestroySignatureInfo(), DestroyString(), DestroyStringInfo(), _Image::filename, FinalizeSignature(), GetCacheViewVirtualPixels(), GetMagickModule, GetPixelChannelChannel(), GetPixelChannels(), GetPixelChannelTraits(), GetPixelReadMask(), GetSignatureDigest(), GetStringInfoDatum(), IsEventLogging(), LogMagickEvent(), _SignatureInfo::lsb_first, MagickCoreSignature, MagickFalse, MagickTrue, QuantumRange, QuantumScale, _Image::rows, SetImageProperty(), SetStringInfoLength(), _Image::signature, StringInfoToHexString(), TraceEvent, UpdatePixelTrait, and UpdateSignature().
Referenced by GetMagickPropertyLetter(), and IdentifyImage().
|
static |
Definition at line 597 of file signature.c.
References _SignatureInfo::accumulator, Ch, DisableMSCWarning, GetStringInfoDatum(), _SignatureInfo::lsb_first, MagickFalse, Maj, _SignatureInfo::message, ResetMagickMemory(), RestoreMSCWarning, Sigma0, Sigma1, Suma0, Suma1, and Trunc32.
Referenced by FinalizeSignature(), and UpdateSignature().
MagickPrivate void UpdateSignature | ( | SignatureInfo * | signature_info, |
const StringInfo * | message | ||
) |
Definition at line 772 of file signature.c.
References _SignatureInfo::extent, GetStringInfoDatum(), GetStringInfoLength(), _SignatureInfo::high_order, _SignatureInfo::low_order, MagickCoreSignature, _SignatureInfo::message, SetStringInfoDatum(), _SignatureInfo::signature, TransformSignature(), and Trunc32.
Referenced by AcquireRandomInfo(), SetRandomKey(), SignatureImage(), and StringInfoToDigest().