Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

md5.cpp File Reference

#include <string.h>
#include "md5.h"

Include dependency graph for md5.cpp:

Go to the source code of this file.

Defines

#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)   ( w += f(x, y, z) + data, w = w<<s | w>>(32-s), w += x )

Functions

void byteReverse (unsigned char *buf, unsigned longs)
void MD5_Init (MD5_CTX *ctx)
void MD5_Update (MD5_CTX *ctx, unsigned char const *buf, unsigned len)
void MD5_Final (unsigned char digest[16], MD5_CTX *ctx)
void MD5Transform (u_int32_t buf[4], u_int32_t const in[16])


Define Documentation

#define F1 x,
y,
 )     (z ^ (x & (y ^ z)))
 

Definition at line 142 of file md5.cpp.

Referenced by MD5Transform().

#define F2 x,
y,
 )     F1(z, x, y)
 

Definition at line 143 of file md5.cpp.

Referenced by MD5Transform().

#define F3 x,
y,
 )     (x ^ y ^ z)
 

Definition at line 144 of file md5.cpp.

Referenced by MD5Transform().

#define F4 x,
y,
 )     (y ^ (x | ~z))
 

Definition at line 145 of file md5.cpp.

Referenced by MD5Transform().

#define MD5STEP f,
w,
x,
y,
z,
data,
s   )     ( w += f(x, y, z) + data, w = w<<s | w>>(32-s), w += x )
 

Definition at line 148 of file md5.cpp.

Referenced by MD5Transform().


Function Documentation

void byteReverse unsigned char *  buf,
unsigned  longs
 

Definition at line 19 of file md5.cpp.

References t.

Referenced by MD5_Final(), and MD5_Update().

void MD5_Final unsigned char  digest[16],
MD5_CTX ctx
 

Definition at line 98 of file md5.cpp.

References byteReverse(), MD5Transform(), and p.

Referenced by generate_random(), sec_hash_16(), sec_hash_48(), sec_sign(), sec_update(), MiscFunctions::smtpAuthCramMd5(), and MiscFunctions::uniqueString().

void MD5_Init MD5_CTX ctx  ) 
 

Definition at line 35 of file md5.cpp.

Referenced by generate_random(), sec_hash_16(), sec_hash_48(), sec_sign(), sec_update(), MiscFunctions::smtpAuthCramMd5(), and MiscFunctions::uniqueString().

void MD5_Update MD5_CTX ctx,
unsigned char const *  buf,
unsigned  len
 

Definition at line 50 of file md5.cpp.

References byteReverse(), MD5Transform(), p, and t.

Referenced by generate_random(), sec_hash_16(), sec_hash_48(), sec_sign(), sec_update(), MiscFunctions::smtpAuthCramMd5(), and MiscFunctions::uniqueString().

void MD5Transform u_int32_t  buf[4],
u_int32_t const   in[16]
 

Definition at line 156 of file md5.cpp.

Referenced by MD5_Final(), MD5_Update(), and MD5Update().


Generated on Sat Nov 5 17:16:09 2005 for OPIE by  doxygen 1.4.2