|
WizardsToolkit
1.0.7
|
#include "wizard/studio.h"#include "wizard/exception.h"#include "wizard/exception-private.h"#include "wizard/memory_.h"#include "wizard/sha384.h"
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 SHA384Info * | AcquireSHA384Info (void) |
| WizardExport SHA384Info * | DestroySHA384Info (SHA384Info *sha_info) |
| WizardExport void | FinalizeSHA384 (SHA384Info *sha_info) |
| WizardExport unsigned int | GetSHA384Blocksize (const SHA384Info *sha384_info) |
| WizardExport const StringInfo * | GetSHA384Digest (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 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)) |
| WizardExport SHA384Info* AcquireSHA384Info | ( | void | ) |
Definition at line 108 of file sha384.c.
References AcquireWizardMemory(), ThrowWizardFatalError, HashError, MemoryError, ResetWizardMemory(), _SHA384Info::digestsize, SHA384Digestsize, _SHA384Info::blocksize, SHA384Blocksize, _SHA384Info::digest, AcquireStringInfo(), _SHA384Info::message, _SHA384Info::accumulator, AcquireQuantumMemory(), _SHA384Info::lsb_first, WizardTrue, WizardFalse, _SHA384Info::timestamp, _SHA384Info::signature, WizardSignature, and InitializeSHA384().
Referenced by AcquireHashInfo().
| static WizardSizeType Ch | ( | WizardSizeType | x, |
| WizardSizeType | y, | ||
| WizardSizeType | z | ||
| ) | [inline, static] |
Definition at line 433 of file sha384.c.
Referenced by TransformSHA384().
| WizardExport SHA384Info* DestroySHA384Info | ( | SHA384Info * | sha_info | ) |
Definition at line 159 of file sha384.c.
References LogWizardEvent(), TraceEvent, GetWizardModule, _SHA384Info::signature, WizardSignature, _SHA384Info::accumulator, RelinquishWizardMemory(), _SHA384Info::message, DestroyStringInfo(), and _SHA384Info::digest.
Referenced by DestroyHashInfo().
| WizardExport void FinalizeSHA384 | ( | SHA384Info * | sha_info | ) |
Definition at line 199 of file sha384.c.
References LogWizardEvent(), TraceEvent, GetWizardModule, _SHA384Info::signature, WizardSignature, _SHA384Info::low_order, _SHA384Info::high_order, GetStringInfoDatum(), _SHA384Info::message, GetStringInfoLength(), ResetWizardMemory(), TransformSHA384(), _SHA384Info::accumulator, _SHA384Info::digest, and SHA384Digestsize.
Referenced by FinalizeHash().
| WizardExport unsigned int GetSHA384Blocksize | ( | const SHA384Info * | sha384_info | ) |
Definition at line 301 of file sha384.c.
References LogWizardEvent(), TraceEvent, GetWizardModule, WizardAssert, CipherDomain, _SHA384Info::signature, WizardSignature, and _SHA384Info::blocksize.
Referenced by GetHashBlocksize().
| WizardExport const StringInfo* GetSHA384Digest | ( | const SHA384Info * | sha384_info | ) |
Definition at line 331 of file sha384.c.
References LogWizardEvent(), TraceEvent, GetWizardModule, WizardAssert, HashDomain, _SHA384Info::signature, WizardSignature, and _SHA384Info::digest.
Referenced by FinalizeHash().
| WizardExport unsigned int GetSHA384Digestsize | ( | const SHA384Info * | sha384_info | ) |
Definition at line 361 of file sha384.c.
References LogWizardEvent(), TraceEvent, GetWizardModule, WizardAssert, CipherDomain, _SHA384Info::signature, WizardSignature, and _SHA384Info::digestsize.
Referenced by AcquireHashInfo(), and GetHashDigestsize().
| WizardExport void InitializeSHA384 | ( | SHA384Info * | sha_info | ) |
Definition at line 391 of file sha384.c.
References LogWizardEvent(), TraceEvent, GetWizardModule, _SHA384Info::signature, WizardSignature, _SHA384Info::accumulator, WizardULLConstant, _SHA384Info::low_order, _SHA384Info::high_order, and _SHA384Info::offset.
Referenced by InitializeHash(), and AcquireSHA384Info().
| 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] |
| static void TransformSHA384 | ( | SHA384Info * | sha_info | ) | [static] |
Definition at line 453 of file sha384.c.
References WizardULLConstant, F(), G(), H(), GetStringInfoDatum(), _SHA384Info::message, _SHA384Info::lsb_first, WizardFalse, _SHA384Info::accumulator, Trunc64(), Sigma1, Sigma0, Suma1, Ch(), Suma0, Maj(), and ResetWizardMemory().
Referenced by FinalizeSHA384(), and UpdateSHA384().
| static WizardSizeType Trunc64 | ( | WizardSizeType | x | ) | [inline, static] |
Definition at line 443 of file sha384.c.
References WizardULLConstant.
Referenced by RotateRight(), TransformSHA384(), and UpdateSHA384().
| WizardExport void UpdateSHA384 | ( | SHA384Info * | sha_info, |
| const StringInfo * | message | ||
| ) |
Definition at line 671 of file sha384.c.
References _SHA384Info::signature, WizardSignature, GetStringInfoLength(), Trunc64(), _SHA384Info::low_order, _SHA384Info::high_order, GetStringInfoDatum(), _SHA384Info::offset, _SHA384Info::message, CopyWizardMemory(), TransformSHA384(), and SetStringInfoDatum().
Referenced by UpdateHash().