Main Page | Namespace List | Class Hierarchy | Compound List | File List | Namespace Members | Compound Members | File Members

md5.cxx File Reference

#include <vector>
#include "abkMD5.h"

Include dependency graph for md5.cxx:

Include dependency graph

Go to the source code of this file.

Defines

#define S11   7
#define S12   12
#define S13   17
#define S14   22
#define S21   5
#define S22   9
#define S23   14
#define S24   20
#define S31   4
#define S32   11
#define S33   16
#define S34   23
#define S41   6
#define S42   10
#define S43   15
#define S44   21
#define F(x, y, z)   (((x) & (y)) | ((~x) & (z)))
#define G(x, y, z)   (((x) & (z)) | ((y) & (~z)))
#define H(x, y, z)   ((x) ^ (y) ^ (z))
#define I(x, y, z)   ((y) ^ ((x) | (~z)))
#define ROTATE_LEFT(x, n)   (((x) << (n)) | ((x) >> (32-(n))))
#define FF(a, b, c, d, x, s, ac)
#define GG(a, b, c, d, x, s, ac)
#define HH(a, b, c, d, x, s, ac)
#define II(a, b, c, d, x, s, ac)

Functions

ostream & operator<< (ostream &os, const MD5 &md5)

Variables

unsigned char PADDING [64]


Define Documentation

#define F x,
y,
 )     (((x) & (y)) | ((~x) & (z)))
 

Definition at line 64 of file md5.cxx.

#define FF a,
b,
c,
d,
x,
s,
ac   ) 
 

Value:

{ \
     (a) += F ((b), (c), (d)) + (x) + (unsigned)(ac); \
     (a) = ROTATE_LEFT ((a), (s)); \
     (a) += (b); \
     }

Definition at line 80 of file md5.cxx.

Referenced by MD5::_transform().

#define G x,
y,
 )     (((x) & (z)) | ((y) & (~z)))
 

Definition at line 65 of file md5.cxx.

#define GG a,
b,
c,
d,
x,
s,
ac   ) 
 

Value:

{ \
     (a) += G ((b), (c), (d)) + (x) + (unsigned)(ac); \
     (a) = ROTATE_LEFT ((a), (s)); \
     (a) += (b); \
     }

Definition at line 85 of file md5.cxx.

Referenced by MD5::_transform().

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

Definition at line 66 of file md5.cxx.

#define HH a,
b,
c,
d,
x,
s,
ac   ) 
 

Value:

{ \
     (a) += H ((b), (c), (d)) + (x) + (unsigned)(ac); \
     (a) = ROTATE_LEFT ((a), (s)); \
     (a) += (b); \
     }

Definition at line 90 of file md5.cxx.

Referenced by MD5::_transform().

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

Definition at line 67 of file md5.cxx.

#define II a,
b,
c,
d,
x,
s,
ac   ) 
 

Value:

{ \
     (a) += I ((b), (c), (d)) + (x) + (unsigned)(ac); \
     (a) = ROTATE_LEFT ((a), (s)); \
     (a) += (b); \
     }

Definition at line 95 of file md5.cxx.

Referenced by MD5::_transform().

#define ROTATE_LEFT x,
 )     (((x) << (n)) | ((x) >> (32-(n))))
 

Definition at line 73 of file md5.cxx.

#define S11   7
 

Definition at line 40 of file md5.cxx.

Referenced by MD5::_transform().

#define S12   12
 

Definition at line 41 of file md5.cxx.

Referenced by MD5::_transform().

#define S13   17
 

Definition at line 42 of file md5.cxx.

Referenced by MD5::_transform().

#define S14   22
 

Definition at line 43 of file md5.cxx.

Referenced by MD5::_transform().

#define S21   5
 

Definition at line 44 of file md5.cxx.

Referenced by MD5::_transform().

#define S22   9
 

Definition at line 45 of file md5.cxx.

Referenced by MD5::_transform().

#define S23   14
 

Definition at line 46 of file md5.cxx.

Referenced by MD5::_transform().

#define S24   20
 

Definition at line 47 of file md5.cxx.

Referenced by MD5::_transform().

#define S31   4
 

Definition at line 48 of file md5.cxx.

Referenced by MD5::_transform().

#define S32   11
 

Definition at line 49 of file md5.cxx.

Referenced by MD5::_transform().

#define S33   16
 

Definition at line 50 of file md5.cxx.

Referenced by MD5::_transform().

#define S34   23
 

Definition at line 51 of file md5.cxx.

Referenced by MD5::_transform().

#define S41   6
 

Definition at line 52 of file md5.cxx.

Referenced by MD5::_transform().

#define S42   10
 

Definition at line 53 of file md5.cxx.

Referenced by MD5::_transform().

#define S43   15
 

Definition at line 54 of file md5.cxx.

Referenced by MD5::_transform().

#define S44   21
 

Definition at line 55 of file md5.cxx.

Referenced by MD5::_transform().


Function Documentation

ostream& operator<< ostream &  os,
const MD5 md5
 

Definition at line 368 of file md5.cxx.

References MD5::_isFinalized, MD5::_state, abkfatal, and MD5::encode().

00369     {
00370     abkfatal(md5._isFinalized,"Can't output state of MD5 before finalization");
00371     int i;
00372     unsigned char digest[16];
00373     char buf[3];
00374     MD5::encode(&digest[0],md5._state,16);
00375     for (i=0;i<16;i++)
00376         {
00377         sprintf(buf,"%02x",digest[i]);
00378         os << buf;
00379         }
00380     return os;
00381     }

Here is the call graph for this function:


Variable Documentation

unsigned char 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 56 of file md5.cxx.

Referenced by MD5::_finalize().


Generated on Mon Apr 25 01:11:36 2005 for Parquete by doxygen 1.3.2