|
MagickCore 7.0.10
|
#include "wizard/studio.h"#include "wizard/exception.h"#include "wizard/exception-private.h"#include "wizard/memory_.h"#include "wizard/signature.h"#include "wizard/string_.h"Go to the source code of this file.
Macros | |
| #define | Trunc32(x) ((x) & 0xffffffffUL) |
| #define | Ch(x, y, z) (((x) & (y)) ^ (~(x) & (z))) |
| #define | Maj(x, y, z) (((x) & (y)) ^ ((x) & (z)) ^ ((y) & (z))) |
| #define | RotateRight(x, n) Trunc32((((x) >> (n)) | ((x) << (32-(n))))) |
| #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 | TransformSignature (SignatureInfo *) |
| WizardExport void | FinalizeSignature (SignatureInfo *signature_info) |
| WizardExport void | GetSignatureInfo (SignatureInfo *signature_info) |
| WizardExport void | UpdateSignature (SignatureInfo *signature_info, const unsigned char *message, const size_t length) |
| #define Ch | ( | x, | |
| y, | |||
| z | |||
| ) | (((x) & (y)) ^ (~(x) & (z))) |
| #define Maj | ( | x, | |
| y, | |||
| z | |||
| ) | (((x) & (y)) ^ ((x) & (z)) ^ ((y) & (z))) |
| #define RotateRight | ( | x, | |
| n | |||
| ) | Trunc32((((x) >> (n)) | ((x) << (32-(n))))) |
| #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)) |
| #define Trunc32 | ( | x | ) | ((x) & 0xffffffffUL) |
Definition at line 52 of file signature.c.
| WizardExport void FinalizeSignature | ( | SignatureInfo * | signature_info | ) |
Definition at line 83 of file signature.c.
References _SignatureInfo::high_order, _SignatureInfo::low_order, _SignatureInfo::message, _SignatureInfo::signature, TransformSignature(), WizardSignature, and WizardSignatureSize.
| WizardExport void GetSignatureInfo | ( | SignatureInfo * | signature_info | ) |
Definition at line 145 of file signature.c.
References _SignatureInfo::digest, _SignatureInfo::lsb_first, _SignatureInfo::signature, WizardFalse, WizardSignature, and WizardTrue.
|
static |
Definition at line 189 of file signature.c.
References Ch, _SignatureInfo::digest, F(), G(), H(), _SignatureInfo::lsb_first, Maj, _SignatureInfo::message, Sigma0, Sigma1, Suma0, Suma1, Trunc32, and WizardFalse.
Referenced by FinalizeSignature(), and UpdateSignature().
| WizardExport void UpdateSignature | ( | SignatureInfo * | signature_info, |
| const unsigned char * | message, | ||
| const size_t | length | ||
| ) |
Definition at line 348 of file signature.c.
References CopyWizardMemory(), _SignatureInfo::high_order, _SignatureInfo::low_order, _SignatureInfo::message, _SignatureInfo::offset, _SignatureInfo::signature, TransformSignature(), Trunc32, WizardSignature, and WizardSignatureSize.