MagickCore 7.0.10
|
#include "wizard/studio.h"
#include "wizard/exception.h"
#include "wizard/exception-private.h"
#include "wizard/memory_.h"
#include "wizard/sha2512.h"
Go to the source code of this file.
Data Structures | |
struct | _SHA2512Info |
Macros | |
#define | SHA2512Blocksize 128 |
#define | SHA2512Digestsize 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 | TransformSHA2512 (SHA2512Info *) |
WizardExport SHA2512Info * | AcquireSHA2512Info (void) |
WizardExport SHA2512Info * | DestroySHA2512Info (SHA2512Info *sha_info) |
WizardExport WizardBooleanType | FinalizeSHA2512 (SHA2512Info *sha_info) |
WizardExport unsigned int | GetSHA2512Blocksize (const SHA2512Info *sha2512_info) |
WizardExport const StringInfo * | GetSHA2512Digest (const SHA2512Info *sha2512_info) |
WizardExport unsigned int | GetSHA2512Digestsize (const SHA2512Info *sha2512_info) |
WizardExport WizardBooleanType | InitializeSHA2512 (SHA2512Info *sha_info) |
static WizardSizeType | Ch (const WizardSizeType x, const WizardSizeType y, const WizardSizeType z) |
static WizardSizeType | Maj (const WizardSizeType x, const WizardSizeType y, const WizardSizeType z) |
static WizardSizeType | Trunc64 (const WizardSizeType x) |
static WizardSizeType | RotateRight (const WizardSizeType x, const WizardSizeType n) |
WizardExport WizardBooleanType | UpdateSHA2512 (SHA2512Info *sha_info, const StringInfo *message) |
#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 SHA2512Info * AcquireSHA2512Info | ( | void | ) |
Definition at line 108 of file sha2512.c.
References _SHA2512Info::accumulator, AcquireQuantumMemory(), AcquireStringInfo(), AcquireWizardMemory(), _SHA2512Info::blocksize, _SHA2512Info::digest, _SHA2512Info::digestsize, HashError, InitializeSHA2512(), _SHA2512Info::lsb_first, MemoryError, _SHA2512Info::message, SHA2512Blocksize, SHA2512Digestsize, _SHA2512Info::signature, ThrowWizardFatalError, _SHA2512Info::timestamp, WizardFalse, WizardSignature, and WizardTrue.
Referenced by AcquireHashInfo().
|
inlinestatic |
WizardExport SHA2512Info * DestroySHA2512Info | ( | SHA2512Info * | sha_info | ) |
Definition at line 159 of file sha2512.c.
References _SHA2512Info::accumulator, DestroyStringInfo(), _SHA2512Info::digest, GetWizardModule, LogWizardEvent(), _SHA2512Info::message, RelinquishWizardMemory(), _SHA2512Info::signature, TraceEvent, and WizardSignature.
Referenced by DestroyHashInfo().
WizardExport WizardBooleanType FinalizeSHA2512 | ( | SHA2512Info * | sha_info | ) |
Definition at line 198 of file sha2512.c.
References _SHA2512Info::accumulator, _SHA2512Info::digest, GetStringInfoDatum(), GetStringInfoLength(), GetWizardModule, _SHA2512Info::high_order, LogWizardEvent(), _SHA2512Info::low_order, _SHA2512Info::message, SHA2512Digestsize, _SHA2512Info::signature, TraceEvent, TransformSHA2512(), WizardSignature, and WizardTrue.
Referenced by FinalizeHash().
WizardExport unsigned int GetSHA2512Blocksize | ( | const SHA2512Info * | sha2512_info | ) |
Definition at line 303 of file sha2512.c.
References _SHA2512Info::blocksize, CipherDomain, GetWizardModule, LogWizardEvent(), _SHA2512Info::signature, TraceEvent, WizardAssert, and WizardSignature.
Referenced by GetHashBlocksize().
WizardExport const StringInfo * GetSHA2512Digest | ( | const SHA2512Info * | sha2512_info | ) |
Definition at line 333 of file sha2512.c.
References _SHA2512Info::digest, GetWizardModule, HashDomain, LogWizardEvent(), _SHA2512Info::signature, TraceEvent, WizardAssert, and WizardSignature.
Referenced by FinalizeHash().
WizardExport unsigned int GetSHA2512Digestsize | ( | const SHA2512Info * | sha2512_info | ) |
Definition at line 363 of file sha2512.c.
References CipherDomain, _SHA2512Info::digestsize, GetWizardModule, LogWizardEvent(), _SHA2512Info::signature, TraceEvent, WizardAssert, and WizardSignature.
Referenced by AcquireHashInfo(), and GetHashDigestsize().
WizardExport WizardBooleanType InitializeSHA2512 | ( | SHA2512Info * | sha_info | ) |
Definition at line 393 of file sha2512.c.
References _SHA2512Info::accumulator, GetWizardModule, _SHA2512Info::high_order, LogWizardEvent(), _SHA2512Info::low_order, _SHA2512Info::offset, _SHA2512Info::signature, TraceEvent, WizardSignature, WizardTrue, and WizardULLConstant.
Referenced by AcquireSHA2512Info(), and InitializeHash().
|
inlinestatic |
|
inlinestatic |
|
static |
Definition at line 458 of file sha2512.c.
References _SHA2512Info::accumulator, Ch, F(), G(), GetStringInfoDatum(), H(), _SHA2512Info::lsb_first, Maj, _SHA2512Info::message, Sigma0, Sigma1, Suma0, Suma1, Trunc64(), WizardFalse, and WizardULLConstant.
Referenced by FinalizeSHA2512(), and UpdateSHA2512().
|
inlinestatic |
Definition at line 447 of file sha2512.c.
References WizardULLConstant.
Referenced by RotateRight(), TransformSHA2512(), and UpdateSHA2512().
WizardExport WizardBooleanType UpdateSHA2512 | ( | SHA2512Info * | sha_info, |
const StringInfo * | message | ||
) |
Definition at line 675 of file sha2512.c.
References CopyWizardMemory(), GetStringInfoDatum(), GetStringInfoLength(), _SHA2512Info::high_order, _SHA2512Info::low_order, _SHA2512Info::message, _SHA2512Info::offset, SetStringInfoDatum(), _SHA2512Info::signature, TransformSHA2512(), Trunc64(), WizardSignature, and WizardTrue.
Referenced by UpdateHash().