MagickCore 7.0.10
|
#include "wizard/studio.h"
#include "wizard/exception.h"
#include "wizard/exception-private.h"
#include "wizard/memory_.h"
#include "wizard/sha1.h"
Go to the source code of this file.
Data Structures | |
struct | _SHA1Info |
Macros | |
#define | SHA1Blocksize 64 |
#define | SHA1Digestsize 20 |
Functions | |
static void | TransformSHA1 (SHA1Info *) |
WizardExport SHA1Info * | AcquireSHA1Info (void) |
WizardExport SHA1Info * | DestroySHA1Info (SHA1Info *sha_info) |
WizardExport WizardBooleanType | FinalizeSHA1 (SHA1Info *sha_info) |
WizardExport unsigned int | GetSHA1Blocksize (const SHA1Info *sha1_info) |
WizardExport const StringInfo * | GetSHA1Digest (const SHA1Info *sha1_info) |
WizardExport unsigned int | GetSHA1Digestsize (const SHA1Info *sha1_info) |
WizardExport WizardBooleanType | InitializeSHA1 (SHA1Info *sha_info) |
static unsigned int | Trunc32 (const unsigned int x) |
static unsigned int | RotateLeft (const unsigned int x, const unsigned int n) |
WizardExport WizardBooleanType | UpdateSHA1 (SHA1Info *sha_info, const StringInfo *message) |
WizardExport SHA1Info * AcquireSHA1Info | ( | void | ) |
Definition at line 109 of file sha1.c.
References _SHA1Info::accumulator, AcquireQuantumMemory(), AcquireStringInfo(), AcquireWizardMemory(), _SHA1Info::blocksize, _SHA1Info::digest, _SHA1Info::digestsize, HashDomain, InitializeSHA1(), _SHA1Info::lsb_first, MemoryError, _SHA1Info::message, SHA1Blocksize, SHA1Digestsize, _SHA1Info::signature, ThrowWizardFatalError, _SHA1Info::timestamp, WizardFalse, WizardSignature, and WizardTrue.
Referenced by AcquireHashInfo().
WizardExport SHA1Info * DestroySHA1Info | ( | SHA1Info * | sha_info | ) |
Definition at line 160 of file sha1.c.
References _SHA1Info::accumulator, DestroyStringInfo(), _SHA1Info::digest, GetWizardModule, LogWizardEvent(), _SHA1Info::message, RelinquishWizardMemory(), _SHA1Info::signature, TraceEvent, and WizardSignature.
Referenced by DestroyHashInfo().
WizardExport WizardBooleanType FinalizeSHA1 | ( | SHA1Info * | sha_info | ) |
Definition at line 199 of file sha1.c.
References _SHA1Info::accumulator, _SHA1Info::digest, GetStringInfoDatum(), GetStringInfoLength(), GetWizardModule, _SHA1Info::high_order, LogWizardEvent(), _SHA1Info::low_order, _SHA1Info::message, SHA1Digestsize, _SHA1Info::signature, TraceEvent, TransformSHA1(), WizardSignature, and WizardTrue.
Referenced by FinalizeHash().
WizardExport unsigned int GetSHA1Blocksize | ( | const SHA1Info * | sha1_info | ) |
Definition at line 292 of file sha1.c.
References _SHA1Info::blocksize, CipherDomain, GetWizardModule, LogWizardEvent(), _SHA1Info::signature, TraceEvent, WizardAssert, and WizardSignature.
Referenced by GetHashBlocksize().
WizardExport const StringInfo * GetSHA1Digest | ( | const SHA1Info * | sha1_info | ) |
Definition at line 322 of file sha1.c.
References _SHA1Info::digest, GetWizardModule, HashDomain, LogWizardEvent(), _SHA1Info::signature, TraceEvent, WizardAssert, and WizardSignature.
Referenced by FinalizeHash().
WizardExport unsigned int GetSHA1Digestsize | ( | const SHA1Info * | sha1_info | ) |
Definition at line 352 of file sha1.c.
References CipherDomain, _SHA1Info::digestsize, GetWizardModule, LogWizardEvent(), _SHA1Info::signature, TraceEvent, WizardAssert, and WizardSignature.
Referenced by AcquireHashInfo(), and GetHashDigestsize().
WizardExport WizardBooleanType InitializeSHA1 | ( | SHA1Info * | sha_info | ) |
Definition at line 382 of file sha1.c.
References _SHA1Info::accumulator, GetWizardModule, _SHA1Info::high_order, LogWizardEvent(), _SHA1Info::low_order, _SHA1Info::offset, _SHA1Info::signature, TraceEvent, WizardSignature, and WizardTrue.
Referenced by AcquireSHA1Info(), and InitializeHash().
|
static |
|
static |
Definition at line 431 of file sha1.c.
References _SHA1Info::accumulator, GetStringInfoDatum(), _SHA1Info::lsb_first, _SHA1Info::message, RotateLeft(), Trunc32, and WizardFalse.
Referenced by FinalizeSHA1(), and UpdateSHA1().
|
inlinestatic |
WizardExport WizardBooleanType UpdateSHA1 | ( | SHA1Info * | sha_info, |
const StringInfo * | message | ||
) |
Definition at line 592 of file sha1.c.
References CopyWizardMemory(), GetStringInfoDatum(), GetStringInfoLength(), _SHA1Info::high_order, _SHA1Info::low_order, _SHA1Info::message, _SHA1Info::offset, SetStringInfoDatum(), _SHA1Info::signature, TransformSHA1(), Trunc32, WizardSignature, and WizardTrue.
Referenced by UpdateHash().