sha512.c File Reference

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

Go to the source code of this file.

Data Structures

struct  _SHA512Info

Defines

#define SHA512Blocksize   128
#define SHA512Digestsize   64
#define Sigma0(x)   (RotateRight(x,1) ^ RotateRight(x,8) ^ Trunc64((x) >> 7))
#define Sigma1(x)   (RotateRight(x,19) ^ RotateRight(x,61) ^ Trunc64((x) >> 6))
#define Suma0(x)   (RotateRight(x,28) ^ RotateRight(x,34) ^ RotateRight(x,39))
#define Suma1(x)   (RotateRight(x,14) ^ RotateRight(x,18) ^ RotateRight(x,41))

Functions

static void TransformSHA512 (SHA512Info *)
WizardExport SHA512InfoAcquireSHA512Info (void)
WizardExport SHA512InfoDestroySHA512Info (SHA512Info *sha_info)
WizardExport void FinalizeSHA512 (SHA512Info *sha_info)
WizardExport unsigned int GetSHA512Blocksize (const SHA512Info *sha512_info)
WizardExport const StringInfoGetSHA512Digest (const SHA512Info *sha512_info)
WizardExport unsigned int GetSHA512Digestsize (const SHA512Info *sha512_info)
WizardExport void InitializeSHA512 (SHA512Info *sha_info)
static WizardSizeType Ch (WizardSizeType x, WizardSizeType y, WizardSizeType z)
static WizardSizeType Maj (WizardSizeType x, WizardSizeType y, WizardSizeType z)
static WizardSizeType Trunc64 (WizardSizeType x)
static WizardSizeType RotateRight (WizardSizeType x, WizardSizeType n)
WizardExport void UpdateSHA512 (SHA512Info *sha_info, const StringInfo *message)

Define Documentation

#define SHA512Blocksize   128

Definition at line 50 of file sha512.c.

Referenced by AcquireSHA512Info().

#define SHA512Digestsize   64

Definition at line 51 of file sha512.c.

Referenced by AcquireSHA512Info(), and FinalizeSHA512().

#define Sigma0 (  )     (RotateRight(x,1) ^ RotateRight(x,8) ^ Trunc64((x) >> 7))
#define Sigma1 (  )     (RotateRight(x,19) ^ RotateRight(x,61) ^ Trunc64((x) >> 6))
#define Suma0 (  )     (RotateRight(x,28) ^ RotateRight(x,34) ^ RotateRight(x,39))
#define Suma1 (  )     (RotateRight(x,14) ^ RotateRight(x,18) ^ RotateRight(x,41))

Function Documentation

WizardExport SHA512Info* AcquireSHA512Info ( void   ) 
static WizardSizeType Ch ( WizardSizeType  x,
WizardSizeType  y,
WizardSizeType  z 
) [inline, static]

Definition at line 435 of file sha512.c.

References Ch.

WizardExport SHA512Info* DestroySHA512Info ( SHA512Info sha_info  ) 
WizardExport void FinalizeSHA512 ( SHA512Info sha_info  ) 
WizardExport unsigned int GetSHA512Blocksize ( const SHA512Info sha512_info  ) 
WizardExport const StringInfo* GetSHA512Digest ( const SHA512Info sha512_info  ) 
WizardExport unsigned int GetSHA512Digestsize ( const SHA512Info sha512_info  ) 
WizardExport void InitializeSHA512 ( SHA512Info sha_info  ) 
static WizardSizeType Maj ( WizardSizeType  x,
WizardSizeType  y,
WizardSizeType  z 
) [inline, static]

Definition at line 440 of file sha512.c.

References Maj.

static WizardSizeType RotateRight ( WizardSizeType  x,
WizardSizeType  n 
) [static]

Definition at line 450 of file sha512.c.

References RotateRight, and Trunc64().

static void TransformSHA512 ( SHA512Info sha_info  )  [static]
static WizardSizeType Trunc64 ( WizardSizeType  x  )  [inline, static]

Definition at line 445 of file sha512.c.

References WizardULLConstant.

Referenced by RotateRight(), TransformSHA512(), and UpdateSHA512().

WizardExport void UpdateSHA512 ( SHA512Info sha_info,
const StringInfo message 
)
Generated by  doxygen 1.6.2-20100208