Data Structures | Defines | Functions

# md5.c File Reference

`#include "wizard/studio.h"`
`#include "wizard/exception.h"`
`#include "wizard/exception-private.h"`
`#include "wizard/memory_.h"`
`#include "wizard/md5.h"`

## Data Structures
struct | _MD5Info
## Defines
#define | MD5Blocksize 64
#define | MD5Digestsize 16
## Functions
static void | TransformMD5 (MD5Info *, unsigned int *)
WizardExport MD5Info * | AcquireMD5Info (void)
WizardExport MD5Info * | DestroyMD5Info (MD5Info *md5_info)
WizardExport void | FinalizeMD5 (MD5Info *md5_info)
WizardExport unsigned int | GetMD5Blocksize (const MD5Info *md5_info)
WizardExport const StringInfo * | GetMD5Digest (const MD5Info *md5_info)
WizardExport unsigned int | GetMD5Digestsize (const MD5Info *md5_info)
WizardExport void | InitializeMD5 (MD5Info *md5_info)
static unsigned int | F (unsigned int x, unsigned int y, unsigned int z)
static unsigned int | G (unsigned int x, unsigned int y, unsigned int z)
static unsigned int | H (unsigned int x, unsigned int y, unsigned int z)
static unsigned int | I (unsigned int x, unsigned int y, unsigned int z)
static unsigned int | Trunc32 (unsigned int x)
static unsigned int | RotateLeft (unsigned int x, unsigned int n)
WizardExport void | UpdateMD5 (MD5Info *md5_info, const StringInfo *message)

## Define Documentation

#define MD5Blocksize 64

Referenced by AcquireMD5Info().

#define MD5Digestsize 16

Referenced by AcquireMD5Info(), and FinalizeMD5().

## Function Documentation

WizardExport MD5Info* AcquireMD5Info | ( | void |  | ) |

References _MD5Info::accumulator, AcquireQuantumMemory(), AcquireStringInfo(), AcquireWizardMemory(), _MD5Info::blocksize, _MD5Info::digest, _MD5Info::digestsize, HashDomain, MD5Blocksize, MD5Digestsize, MemoryError, _MD5Info::message, ResetWizardMemory(), _MD5Info::signature, ThrowWizardFatalError, and _MD5Info::timestamp.

Referenced by AcquireHashInfo().

WizardExport MD5Info* DestroyMD5Info | ( | MD5Info * | md5_info | ) |

References _MD5Info::accumulator, DestroyStringInfo(), _MD5Info::digest, GetWizardModule, LogWizardEvent(), _MD5Info::message, RelinquishWizardMemory(), _MD5Info::signature, TraceEvent, and WizardSignature.

Referenced by DestroyHashInfo().

static unsigned int F | ( | unsigned int | x,
|  | unsigned int | y,
|  | unsigned int | z |
| ) |  |  | `[inline, static]`

Referenced by TransformMD5().

WizardExport void FinalizeMD5 | ( | MD5Info * | md5_info | ) |

References _MD5Info::accumulator, AcquireStringInfo(), DestroyStringInfo(), _MD5Info::digest, GetStringInfoDatum(), GetStringInfoLength(), GetWizardModule, _MD5Info::high_order, LogWizardEvent(), _MD5Info::low_order, MD5Digestsize, _MD5Info::message, ResetWizardMemory(), _MD5Info::signature, TraceEvent, TransformMD5(), UpdateMD5(), and WizardSignature.

Referenced by FinalizeHash().

static unsigned int G | ( | unsigned int | x,
|  | unsigned int | y,
|  | unsigned int | z |
| ) |  |  | `[inline, static]`

Referenced by TransformMD5().

WizardExport unsigned int GetMD5Blocksize | ( | const MD5Info * | md5_info | ) |

References _MD5Info::blocksize, CipherDomain, GetWizardModule, LogWizardEvent(), _MD5Info::signature, TraceEvent, WizardAssert, and WizardSignature.

Referenced by GetHashBlocksize().

WizardExport const StringInfo* GetMD5Digest | ( | const MD5Info * | md5_info | ) |

References _MD5Info::digest, GetWizardModule, HashDomain, LogWizardEvent(), _MD5Info::signature, TraceEvent, WizardAssert, and WizardSignature.

Referenced by FinalizeHash().

WizardExport unsigned int GetMD5Digestsize | ( | const MD5Info * | md5_info | ) |

References CipherDomain, _MD5Info::digestsize, GetWizardModule, LogWizardEvent(), _MD5Info::signature, TraceEvent, WizardAssert, and WizardSignature.

Referenced by AcquireHashInfo(), and GetHashDigestsize().

static unsigned int H | ( | unsigned int | x,
|  | unsigned int | y,
|  | unsigned int | z |
| ) |  |  | `[inline, static]`

Referenced by TransformMD5().

static unsigned int I | ( | unsigned int | x,
|  | unsigned int | y,
|  | unsigned int | z |
| ) |  |  | `[inline, static]`

Referenced by DecipherAESBlock(), and TransformMD5().

WizardExport void InitializeMD5 | ( | MD5Info * | md5_info | ) |

References _MD5Info::accumulator, GetWizardModule, _MD5Info::high_order, LogWizardEvent(), _MD5Info::low_order, _MD5Info::signature, TraceEvent, and WizardSignature.

Referenced by InitializeHash().

static unsigned int RotateLeft | ( | unsigned int | x,
|  | unsigned int | n |
| ) |  |  | `[inline, static]`

References Trunc32().

Referenced by TransformMD5().

static void TransformMD5 | ( | MD5Info * | md5_info,
|  | unsigned int * | message |
| ) |  |  | `[static]`

References _MD5Info::accumulator, F(), G(), H(), I(), RotateLeft(), and Trunc32().

Referenced by FinalizeMD5(), and UpdateMD5().

static unsigned int Trunc32 | ( | unsigned int | x | ) | `[inline, static]`

Referenced by RotateLeft(), and TransformMD5().

WizardExport void UpdateMD5 | ( | MD5Info * | md5_info,
|  | const StringInfo * | message |
| ) |  |  |

References GetStringInfoDatum(), GetStringInfoLength(), _MD5Info::high_order, _MD5Info::low_order, _MD5Info::message, ResetWizardMemory(), _MD5Info::signature, TransformMD5(), and WizardSignature.

Referenced by FinalizeMD5(), and UpdateHash().