WizardsToolkit  1.0.7
sha384.c File Reference
#include "wizard/studio.h"
#include "wizard/exception.h"
#include "wizard/exception-private.h"
#include "wizard/memory_.h"
#include "wizard/sha384.h"
Include dependency graph for sha384.c:

Go to the source code of this file.

Data Structures

struct  _SHA384Info

Defines

#define SHA384Blocksize   128
#define SHA384Digestsize   48
#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 TransformSHA384 (SHA384Info *)
WizardExport SHA384InfoAcquireSHA384Info (void)
WizardExport SHA384InfoDestroySHA384Info (SHA384Info *sha_info)
WizardExport void FinalizeSHA384 (SHA384Info *sha_info)
WizardExport unsigned int GetSHA384Blocksize (const SHA384Info *sha384_info)
WizardExport const StringInfoGetSHA384Digest (const SHA384Info *sha384_info)
WizardExport unsigned int GetSHA384Digestsize (const SHA384Info *sha384_info)
WizardExport void InitializeSHA384 (SHA384Info *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 UpdateSHA384 (SHA384Info *sha_info, const StringInfo *message)

Define Documentation

#define SHA384Blocksize   128

Definition at line 50 of file sha384.c.

Referenced by AcquireSHA384Info().

#define SHA384Digestsize   48

Definition at line 51 of file sha384.c.

Referenced by AcquireSHA384Info(), and FinalizeSHA384().

#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

static WizardSizeType Ch ( WizardSizeType  x,
WizardSizeType  y,
WizardSizeType  z 
) [inline, static]

Definition at line 433 of file sha384.c.

Referenced by TransformSHA384().

WizardExport unsigned int GetSHA384Blocksize ( const SHA384Info sha384_info)
WizardExport const StringInfo* GetSHA384Digest ( const SHA384Info sha384_info)
WizardExport unsigned int GetSHA384Digestsize ( const SHA384Info sha384_info)
static WizardSizeType Maj ( WizardSizeType  x,
WizardSizeType  y,
WizardSizeType  z 
) [inline, static]

Definition at line 438 of file sha384.c.

Referenced by TransformSHA384().

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

Definition at line 448 of file sha384.c.

References Trunc64().

static void TransformSHA384 ( SHA384Info sha_info) [static]
static WizardSizeType Trunc64 ( WizardSizeType  x) [inline, static]

Definition at line 443 of file sha384.c.

References WizardULLConstant.

Referenced by RotateRight(), TransformSHA384(), and UpdateSHA384().