sha224.c File Reference

#include "wizard/studio.h"
#include "wizard/exception.h"
#include "wizard/exception-private.h"
#include "wizard/memory_.h"
#include "wizard/sha224.h"
Include dependency graph for sha224.c:

Go to the source code of this file.

Data Structures

struct  _SHA224Info

Defines

#define SHA224Blocksize   64
#define SHA224Digestsize   28
#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 TransformSHA224 (SHA224Info *)
WizardExport SHA224InfoAcquireSHA224Info (void)
WizardExport SHA224InfoDestroySHA224Info (SHA224Info *sha_info)
WizardExport void FinalizeSHA224 (SHA224Info *sha_info)
WizardExport unsigned int GetSHA224Blocksize (const SHA224Info *sha224_info)
WizardExport const StringInfoGetSHA224Digest (const SHA224Info *sha224_info)
WizardExport unsigned int GetSHA224Digestsize (const SHA224Info *sha224_info)
WizardExport void InitializeSHA224 (SHA224Info *sha_info)
static unsigned int Ch (unsigned int x, unsigned int y, unsigned int z)
static unsigned int Maj (unsigned int x, unsigned int y, unsigned int z)
static unsigned int Trunc32 (unsigned int x)
static unsigned int RotateRight (unsigned int x, unsigned int n)
WizardExport void UpdateSHA224 (SHA224Info *sha_info, const StringInfo *message)

Define Documentation

#define SHA224Blocksize   64

Definition at line 50 of file sha224.c.

Referenced by AcquireSHA224Info().

#define SHA224Digestsize   28

Definition at line 51 of file sha224.c.

Referenced by AcquireSHA224Info(), and FinalizeSHA224().

#define Sigma0 (  )     (RotateRight(x,7) ^ RotateRight(x,18) ^ Trunc32((x) >> 3))
#define Sigma1 (  )     (RotateRight(x,17) ^ RotateRight(x,19) ^ Trunc32((x) >> 10))
#define Suma0 (  )     (RotateRight(x,2) ^ RotateRight(x,13) ^ RotateRight(x,22))
#define Suma1 (  )     (RotateRight(x,6) ^ RotateRight(x,11) ^ RotateRight(x,25))

Function Documentation

WizardExport SHA224Info* AcquireSHA224Info ( void   ) 
static unsigned int Ch ( unsigned int  x,
unsigned int  y,
unsigned int  z 
) [inline, static]

Definition at line 420 of file sha224.c.

References Ch.

WizardExport SHA224Info* DestroySHA224Info ( SHA224Info sha_info  ) 
WizardExport void FinalizeSHA224 ( SHA224Info sha_info  ) 
WizardExport unsigned int GetSHA224Blocksize ( const SHA224Info sha224_info  ) 
WizardExport const StringInfo* GetSHA224Digest ( const SHA224Info sha224_info  ) 
WizardExport unsigned int GetSHA224Digestsize ( const SHA224Info sha224_info  ) 
WizardExport void InitializeSHA224 ( SHA224Info sha_info  ) 
static unsigned int Maj ( unsigned int  x,
unsigned int  y,
unsigned int  z 
) [inline, static]

Definition at line 425 of file sha224.c.

References Maj.

static unsigned int RotateRight ( unsigned int  x,
unsigned int  n 
) [static]

Definition at line 435 of file sha224.c.

References RotateRight, and Trunc32.

static void TransformSHA224 ( SHA224Info sha_info  )  [static]
static unsigned int Trunc32 ( unsigned int  x  )  [inline, static]

Definition at line 430 of file sha224.c.

WizardExport void UpdateSHA224 ( SHA224Info sha_info,
const StringInfo message 
)
Generated by  doxygen 1.6.2-20100208