MagickCore  7.0.8
Convert, Edit, Or Compose Bitmap Images
signature.c File Reference
Include dependency graph for signature.c:

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 SignatureInfoAcquireSignatureInfo (void)
 
MagickPrivate SignatureInfoDestroySignatureInfo (SignatureInfo *signature_info)
 
MagickPrivate void FinalizeSignature (SignatureInfo *signature_info)
 
MagickPrivate unsigned int GetSignatureBlocksize (const SignatureInfo *signature_info)
 
MagickPrivate const StringInfoGetSignatureDigest (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)
 

Macro Definition Documentation

◆ Ch

#define Ch (   x,
  y,
 
)    (((x) & (y)) ^ (~(x) & (z)))

Referenced by TransformSignature().

◆ Maj

#define Maj (   x,
  y,
 
)    (((x) & (y)) ^ ((x) & (z)) ^ ((y) & (z)))

Referenced by TransformSignature().

◆ RotateRight

#define RotateRight (   x,
 
)    (Trunc32(((x) >> n) | ((x) << (32-n))))

◆ Sigma0

#define Sigma0 (   x)    (RotateRight(x,7) ^ RotateRight(x,18) ^ Trunc32((x) >> 3))

Referenced by TransformSignature().

◆ Sigma1

#define Sigma1 (   x)    (RotateRight(x,17) ^ RotateRight(x,19) ^ Trunc32((x) >> 10))

Referenced by TransformSignature().

◆ SignatureBlocksize

#define SignatureBlocksize   64

Definition at line 59 of file signature.c.

Referenced by AcquireSignatureInfo().

◆ SignatureDigestsize

#define SignatureDigestsize   32

Definition at line 60 of file signature.c.

Referenced by AcquireSignatureInfo(), and FinalizeSignature().

◆ Suma0

#define Suma0 (   x)    (RotateRight(x,2) ^ RotateRight(x,13) ^ RotateRight(x,22))

Referenced by TransformSignature().

◆ Suma1

#define Suma1 (   x)    (RotateRight(x,6) ^ RotateRight(x,11) ^ RotateRight(x,25))

Referenced by TransformSignature().

◆ Trunc32

#define Trunc32 (   x)    ((unsigned int) ((x) & 0xffffffffU))

Function Documentation

◆ AcquireSignatureInfo()

◆ DestroySignatureInfo()

◆ FinalizeSignature()

◆ GetSignatureBlocksize()

MagickPrivate unsigned int GetSignatureBlocksize ( const SignatureInfo signature_info)

◆ GetSignatureDigest()

MagickPrivate const StringInfo* GetSignatureDigest ( const SignatureInfo signature_info)

◆ GetSignatureDigestsize()

MagickPrivate unsigned int GetSignatureDigestsize ( const SignatureInfo signature_info)

◆ InitializeSignature()

◆ SetSignatureDigest()

MagickPrivate void SetSignatureDigest ( SignatureInfo signature_info,
const StringInfo digest 
)

◆ SignatureImage()

◆ TransformSignature()

◆ UpdateSignature()