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

Go to the source code of this file.

Data Structures

struct  _SHA2256Info
 

Macros

#define SHA2256Blocksize   64
 
#define SHA2256Digestsize   32
 
#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 TransformSHA2256 (SHA2256Info *)
 
WizardExport SHA2256InfoAcquireSHA2256Info (void)
 
WizardExport SHA2256InfoDestroySHA2256Info (SHA2256Info *sha_info)
 
WizardExport WizardBooleanType FinalizeSHA2256 (SHA2256Info *sha_info)
 
WizardExport unsigned int GetSHA2256Blocksize (const SHA2256Info *sha2256_info)
 
WizardExport const StringInfoGetSHA2256Digest (const SHA2256Info *sha2256_info)
 
WizardExport unsigned int GetSHA2256Digestsize (const SHA2256Info *sha2256_info)
 
WizardExport WizardBooleanType InitializeSHA2256 (SHA2256Info *sha_info)
 
static unsigned int Ch (const unsigned int x, const unsigned int y, const unsigned int z)
 
static unsigned int Maj (const unsigned int x, const unsigned int y, const unsigned int z)
 
static unsigned int Trunc32 (const unsigned int x)
 
static unsigned int RotateRight (const unsigned int x, const unsigned int n)
 
WizardExport WizardBooleanType UpdateSHA2256 (SHA2256Info *sha_info, const StringInfo *message)
 

Macro Definition Documentation

◆ SHA2256Blocksize

#define SHA2256Blocksize   64

Definition at line 50 of file sha2256.c.

◆ SHA2256Digestsize

#define SHA2256Digestsize   32

Definition at line 51 of file sha2256.c.

◆ 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))

Function Documentation

◆ AcquireSHA2256Info()

◆ Ch()

static unsigned int Ch ( const unsigned int  x,
const unsigned int  y,
const unsigned int  z 
)
inlinestatic

Definition at line 423 of file sha2256.c.

◆ DestroySHA2256Info()

◆ FinalizeSHA2256()

◆ GetSHA2256Blocksize()

WizardExport unsigned int GetSHA2256Blocksize ( const SHA2256Info sha2256_info)

◆ GetSHA2256Digest()

WizardExport const StringInfo * GetSHA2256Digest ( const SHA2256Info sha2256_info)

◆ GetSHA2256Digestsize()

WizardExport unsigned int GetSHA2256Digestsize ( const SHA2256Info sha2256_info)

◆ InitializeSHA2256()

◆ Maj()

static unsigned int Maj ( const unsigned int  x,
const unsigned int  y,
const unsigned int  z 
)
inlinestatic

Definition at line 429 of file sha2256.c.

◆ RotateRight()

static unsigned int RotateRight ( const unsigned int  x,
const unsigned int  n 
)
static

Definition at line 440 of file sha2256.c.

References Trunc32.

◆ TransformSHA2256()

static void TransformSHA2256 ( SHA2256Info sha_info)
static

◆ Trunc32()

static unsigned int Trunc32 ( const unsigned int  x)
inlinestatic

Definition at line 435 of file sha2256.c.

◆ UpdateSHA2256()