MagickCore 7.0.10
signature.c File Reference
Include dependency graph for signature.c:

Go to the source code of this file.

Macros

#define Trunc32(x)   ((x) & 0xffffffffUL)
 
#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))
 

Functions

static void TransformSignature (SignatureInfo *)
 
WizardExport void FinalizeSignature (SignatureInfo *signature_info)
 
WizardExport void GetSignatureInfo (SignatureInfo *signature_info)
 
WizardExport void UpdateSignature (SignatureInfo *signature_info, const unsigned char *message, const size_t length)
 

Macro Definition Documentation

◆ Ch

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

◆ Maj

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

◆ RotateRight

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

◆ Sigma0

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

◆ Sigma1

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

◆ Suma0

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

◆ Suma1

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

◆ Trunc32

#define Trunc32 (   x)    ((x) & 0xffffffffUL)

Definition at line 52 of file signature.c.

Function Documentation

◆ FinalizeSignature()

◆ GetSignatureInfo()

WizardExport void GetSignatureInfo ( SignatureInfo signature_info)

◆ TransformSignature()

static void TransformSignature ( SignatureInfo signature_info)
static

◆ UpdateSignature()

WizardExport void UpdateSignature ( SignatureInfo signature_info,
const unsigned char *  message,
const size_t  length 
)