#include "system.h"
#include "md5.h"
#include "debug.h"
Go to the source code of this file.
Compounds | |
union | _mendian |
Defines | |
#define | IS_BIG_ENDIAN() (_endian->b[0] == '\x44') |
#define | IS_LITTLE_ENDIAN() (_endian->b[0] == '\x11') |
#define | F1(x, y, z) (z ^ (x & (y ^ z))) |
#define | F2(x, y, z) F1(z, x, y) |
#define | F3(x, y, z) (x ^ y ^ z) |
#define | F4(x, y, z) (y ^ (x | ~z)) |
#define | MD5STEP(f, w, x, y, z, data, s) |
Functions | |
void | byteReverse (unsigned char *buf, unsigned longs) |
void | rpmMD5Init (struct MD5Context *ctx, int brokenEndian) |
Initialize MD5 hash. More... | |
void | rpmMD5Update (struct MD5Context *ctx, unsigned char const *buf, unsigned len) |
Update context to reflect the concatenation of another buffer full of bytes. More... | |
void | rpmMD5Final (unsigned char digest[16], struct MD5Context *ctx) |
Return MD5 digest, and reset context. More... | |
void | rpmMD5Transform (uint32 buf[4], uint32 const in[16]) |
The core of the MD5 algorithm. More... | |
Variables | |
int | _ie = 0x44332211 |
union _mendian * | _endian |
The algorithm is due to Ron Rivest. This code was written by Colin Plumb in 1993, no copyright is claimed. This code is in the public domain; do with it what you wish.
Equivalent code is available from RSA Data Security, Inc. This code has been tested against that, and is equivalent, except that you don't need to include two pages of legalese with every copy.
To compute the message digest of a chunk of bytes, declare an MD5Context structure, pass it to rpmMD5Init, call rpmMD5Update as needed on buffers full of bytes, and then call rpmMD5Final, which will fill a supplied 16-byte array with the digest.
Definition in file md5.c.
|
|
|
|
|
|
|
|
|
Definition at line 27 of file md5.c. Referenced by rpmDigestInit(), rpmMD5Init(), and rpmVerifyFile(). |
|
|
|
Initializer: \ ( w += f(x, y, z) + data, w = w<<s | w>>(32-s), w += x ) Definition at line 178 of file md5.c. Referenced by MD5Transform(), and rpmMD5Transform(). |
|
|
|
Return MD5 digest, and reset context.
Definition at line 125 of file md5.c. Referenced by domd5(). |
|
Initialize MD5 hash. Set bit count to 0 and buffer to mysterious initialization constants.
Definition at line 50 of file md5.c. Referenced by domd5(). |
|
The core of the MD5 algorithm. This alters an existing MD5 hash to reflect the addition of 16 longwords of new data.
Definition at line 186 of file md5.c. Referenced by rpmMD5Final(), and rpmMD5Update(). |
|
Update context to reflect the concatenation of another buffer full of bytes.
Definition at line 75 of file md5.c. Referenced by domd5(). |
|
|
|
|