Main Page Modules Data Structures File List Data Fields Globals Related Pages

# beecrypt/md5.c File Reference

MD5 hash function, code. More...

`#include "system.h"`
`#include "md5.h"`
`#include "mp32.h"`
`#include "endianness.h"`
`#include "debug.h"`

Go to the source code of this file.

## Defines

#define | FF(a, b, c, d, w, s, t)
#define | GG(a, b, c, d, w, s, t)
#define | HH(a, b, c, d, w, s, t)
#define | II(a, b, c, d, w, s, t)

## Functions

int | md5Reset (register md5Param *p)
void | md5Process (md5Param *p)
int | md5Update (md5Param *p, const byte *data, int size)
void | md5Finish (md5Param *p)
int | md5Digest (md5Param *p, uint32 *data)

## Variables

uint32 | md5hinit [4] = { 0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476 }
const hashFunction | md5 = { "MD5", sizeof(md5Param), 64, 4 * sizeof(uint32), (hashFunctionReset) md5Reset, (hashFunctionUpdate) md5Update, (hashFunctionDigest) md5Digest }

## Detailed Description

MD5 hash function, code.

Definition in file md5.c.

## Define Documentation

#define FF | ( | a,
|  | b,
|  | c,
|  | d,
|  | w,
|  | s,
|  | t |  | ) |

Value:

    a += ((b&(c^d))^d) + w + t;     \
            a = ROTL32(a, s);       \
            a += b;

Definition at line 54 of file md5.c.

Referenced by md5Process.

#define GG | ( | a,
|  | b,
|  | c,
|  | d,
|  | w,
|  | s,
|  | t |  | ) |

Value:

    a += ((d&(b^c))^c) + w + t;     \
            a = ROTL32(a, s);       \
            a += b;

Definition at line 59 of file md5.c.

Referenced by md5Process.

#define HH | ( | a,
|  | b,
|  | c,
|  | d,
|  | w,
|  | s,
|  | t |  | ) |

Value:

    a += (b^c^d) + w + t;   \
            a = ROTL32(a, s);       \
            a += b;

Definition at line 64 of file md5.c.

Referenced by md5Process.

#define II | ( | a,
|  | b,
|  | c,
|  | d,
|  | w,
|  | s,
|  | t |  | ) |

Value:

    a += (c^(b|~d)) + w + t;        \
            a = ROTL32(a, s);       \
            a += b;

Definition at line 69 of file md5.c.

Referenced by md5Process.

## Function Documentation

int md5Reset | ( | register md5Param * | p | ) |

| Definition at line 44 of file md5.c. References md5hinit, mp32copy, and mp32zero.