Data Structures | Defines | Functions

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"

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

Referenced by AcquireSHA224Info().

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

Function Documentation

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

Referenced by TransformSHA224().

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]

Referenced by TransformSHA224().

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

References Trunc32().

static void TransformSHA224 ( SHA224Info sha_info  )  [static]
static unsigned int Trunc32 ( unsigned int  x  )  [inline, static]
WizardExport void UpdateSHA224 ( SHA224Info sha_info,
const StringInfo message 
)