|
WizardsToolkit
1.0.7
|
#include "wizard/studio.h"#include "wizard/exception.h"#include "wizard/exception-private.h"#include "wizard/memory_.h"#include "wizard/sha224.h"
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 SHA224Info * | AcquireSHA224Info (void) |
| 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 | 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 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 | ( | x | ) | (RotateRight(x,7) ^ RotateRight(x,18) ^ Trunc32((x) >> 3)) |
Referenced by TransformSHA224(), TransformSHA256(), TransformSHA384(), TransformSHA512(), and TransformSignature().
| #define Sigma1 | ( | x | ) | (RotateRight(x,17) ^ RotateRight(x,19) ^ Trunc32((x) >> 10)) |
Referenced by TransformSHA224(), TransformSHA256(), TransformSHA384(), TransformSHA512(), and TransformSignature().
| #define Suma0 | ( | x | ) | (RotateRight(x,2) ^ RotateRight(x,13) ^ RotateRight(x,22)) |
Referenced by TransformSHA224(), TransformSHA256(), TransformSHA384(), TransformSHA512(), and TransformSignature().
| #define Suma1 | ( | x | ) | (RotateRight(x,6) ^ RotateRight(x,11) ^ RotateRight(x,25)) |
Referenced by TransformSHA224(), TransformSHA256(), TransformSHA384(), TransformSHA512(), and TransformSignature().
| WizardExport SHA224Info* AcquireSHA224Info | ( | void | ) |
Definition at line 108 of file sha224.c.
References AcquireWizardMemory(), ThrowWizardFatalError, HashError, MemoryError, ResetWizardMemory(), _SHA224Info::digestsize, SHA224Digestsize, _SHA224Info::blocksize, SHA224Blocksize, _SHA224Info::digest, AcquireStringInfo(), _SHA224Info::message, _SHA224Info::accumulator, AcquireQuantumMemory(), _SHA224Info::lsb_first, WizardTrue, WizardFalse, _SHA224Info::timestamp, _SHA224Info::signature, WizardSignature, and InitializeSHA224().
Referenced by AcquireHashInfo().
| static unsigned int Ch | ( | unsigned int | x, |
| unsigned int | y, | ||
| unsigned int | z | ||
| ) | [inline, static] |
Definition at line 420 of file sha224.c.
Referenced by TransformSHA224().
| WizardExport SHA224Info* DestroySHA224Info | ( | SHA224Info * | sha_info | ) |
Definition at line 158 of file sha224.c.
References LogWizardEvent(), TraceEvent, GetWizardModule, _SHA224Info::signature, WizardSignature, _SHA224Info::accumulator, RelinquishWizardMemory(), _SHA224Info::message, DestroyStringInfo(), and _SHA224Info::digest.
Referenced by DestroyHashInfo().
| WizardExport void FinalizeSHA224 | ( | SHA224Info * | sha_info | ) |
Definition at line 198 of file sha224.c.
References LogWizardEvent(), TraceEvent, GetWizardModule, _SHA224Info::signature, WizardSignature, _SHA224Info::low_order, _SHA224Info::high_order, GetStringInfoDatum(), _SHA224Info::message, GetStringInfoLength(), ResetWizardMemory(), TransformSHA224(), _SHA224Info::accumulator, _SHA224Info::digest, and SHA224Digestsize.
Referenced by FinalizeHash().
| WizardExport unsigned int GetSHA224Blocksize | ( | const SHA224Info * | sha224_info | ) |
Definition at line 288 of file sha224.c.
References LogWizardEvent(), TraceEvent, GetWizardModule, WizardAssert, CipherDomain, _SHA224Info::signature, WizardSignature, and _SHA224Info::blocksize.
Referenced by GetHashBlocksize().
| WizardExport const StringInfo* GetSHA224Digest | ( | const SHA224Info * | sha224_info | ) |
Definition at line 318 of file sha224.c.
References LogWizardEvent(), TraceEvent, GetWizardModule, WizardAssert, HashDomain, _SHA224Info::signature, WizardSignature, and _SHA224Info::digest.
Referenced by FinalizeHash().
| WizardExport unsigned int GetSHA224Digestsize | ( | const SHA224Info * | sha224_info | ) |
Definition at line 348 of file sha224.c.
References LogWizardEvent(), TraceEvent, GetWizardModule, WizardAssert, CipherDomain, _SHA224Info::signature, WizardSignature, and _SHA224Info::digestsize.
Referenced by AcquireHashInfo(), and GetHashDigestsize().
| WizardExport void InitializeSHA224 | ( | SHA224Info * | sha_info | ) |
Definition at line 378 of file sha224.c.
References LogWizardEvent(), TraceEvent, GetWizardModule, _SHA224Info::signature, WizardSignature, _SHA224Info::accumulator, _SHA224Info::low_order, _SHA224Info::high_order, and _SHA224Info::offset.
Referenced by InitializeHash(), and AcquireSHA224Info().
| static unsigned int Maj | ( | unsigned int | x, |
| unsigned int | y, | ||
| unsigned int | z | ||
| ) | [inline, static] |
Definition at line 425 of file sha224.c.
Referenced by TransformSHA224().
| static unsigned int RotateRight | ( | unsigned int | x, |
| unsigned int | n | ||
| ) | [static] |
| static void TransformSHA224 | ( | SHA224Info * | sha_info | ) | [static] |
Definition at line 440 of file sha224.c.
References F(), G(), H(), GetStringInfoDatum(), _SHA224Info::message, _SHA224Info::lsb_first, WizardFalse, Trunc32(), _SHA224Info::accumulator, Sigma1, Sigma0, Suma1, Ch(), Suma0, Maj(), and ResetWizardMemory().
Referenced by FinalizeSHA224(), and UpdateSHA224().
| static unsigned int Trunc32 | ( | unsigned int | x | ) | [inline, static] |
Definition at line 430 of file sha224.c.
Referenced by RotateRight(), TransformSHA224(), and UpdateSHA224().
| WizardExport void UpdateSHA224 | ( | SHA224Info * | sha_info, |
| const StringInfo * | message | ||
| ) |
Definition at line 607 of file sha224.c.
References _SHA224Info::signature, WizardSignature, GetStringInfoLength(), Trunc32(), _SHA224Info::low_order, _SHA224Info::high_order, GetStringInfoDatum(), _SHA224Info::offset, _SHA224Info::message, CopyWizardMemory(), TransformSHA224(), and SetStringInfoDatum().
Referenced by UpdateHash().