Data Structures | Defines | Functions

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"

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

Referenced by AcquireSHA512Info().

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

Function Documentation

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

Referenced by TransformSHA512().

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]

Referenced by TransformSHA512().

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

References Trunc64().

static void TransformSHA512 ( SHA512Info sha_info  )  [static]
static WizardSizeType Trunc64 ( WizardSizeType  x  )  [inline, static]
WizardExport void UpdateSHA512 ( SHA512Info sha_info,
const StringInfo message 
)