#include "md5.h"
#include "../Build.h"
Go to the source code of this file.
Defines | |
#define | GET_UINT32(n, b, i) |
#define | PUT_UINT32(n, b, i) |
#define | S(x, n) ((x << n) | ((x & 0xFFFFFFFF) >> (32 - n))) |
#define | P(a, b, c, d, k, s, t) |
#define | F(x, y, z) (z ^ (x & (y ^ z))) |
#define | F(x, y, z) (y ^ (z & (x ^ y))) |
#define | F(x, y, z) (x ^ y ^ z) |
#define | F(x, y, z) (y ^ (x | ~z)) |
#define | a md5sum |
Functions | |
void | md5_starts (struct md5_context *ctx) |
void | md5_process (struct md5_context *ctx, uint8 data[64]) |
void | md5_update (struct md5_context *ctx, uint8 *input, uint32 length) |
void | md5_finish (struct md5_context *ctx, uint8 digest[16]) |
void | Getmd5Hash (char *buffer, unsigned int len, unsigned char *result) |
Variables | |
static uint8 | md5_padding [64] |
#define a md5sum |
Referenced by Getmd5Hash().
#define F | ( | x, | |||
y, | |||||
z | ) | (y ^ (x | ~z)) |
#define F | ( | x, | |||
y, | |||||
z | ) | (x ^ y ^ z) |
#define F | ( | x, | |||
y, | |||||
z | ) | (y ^ (z & (x ^ y))) |
#define F | ( | x, | |||
y, | |||||
z | ) | (z ^ (x & (y ^ z))) |
Referenced by G().
#define GET_UINT32 | ( | n, | |||
b, | |||||
i | ) |
#define P | ( | a, | |||
b, | |||||
c, | |||||
d, | |||||
k, | |||||
s, | |||||
t | ) |
#define PUT_UINT32 | ( | n, | |||
b, | |||||
i | ) |
#define S | ( | x, | |||
n | ) | ((x << n) | ((x & 0xFFFFFFFF) >> (32 - n))) |
void Getmd5Hash | ( | char * | buffer, | |
unsigned int | len, | |||
unsigned char * | result | |||
) |
Definition at line 226 of file md5.cpp.
References a, md5_finish(), md5_starts(), md5_update(), and snprintf.
Referenced by CreateDigestAuth().
void md5_finish | ( | struct md5_context * | ctx, | |
uint8 | digest[16] | |||
) |
Definition at line 204 of file md5.cpp.
References md5_padding, md5_update(), PUT_UINT32, md5_context::state, md5_context::total, uint32, and uint8.
Referenced by Getmd5Hash().
void md5_process | ( | struct md5_context * | ctx, | |
uint8 | data[64] | |||
) |
Definition at line 36 of file md5.cpp.
References A, B, C, D, GET_UINT32, P, md5_context::state, and uint32.
Referenced by md5_update().
void md5_starts | ( | struct md5_context * | ctx | ) |
Definition at line 26 of file md5.cpp.
References md5_context::state, and md5_context::total.
Referenced by Getmd5Hash().
void md5_update | ( | struct md5_context * | ctx, | |
uint8 * | input, | |||
uint32 | length | |||
) |
Definition at line 159 of file md5.cpp.
References md5_context::buffer, md5_process(), md5_context::total, and uint32.
Referenced by Getmd5Hash(), and md5_finish().
uint8 md5_padding[64] [static] |
Initial value:
{ 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
Definition at line 196 of file md5.cpp.
Referenced by md5_finish().