doom3-gpl
Doom 3 GPL source release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Macros | Typedefs | Functions
MD4.cpp File Reference
#include "../precompiled.h"

Go to the source code of this file.

Classes

struct  MD4_CTX
 

Macros

#define S11   3
 
#define S12   7
 
#define S13   11
 
#define S14   19
 
#define S21   3
 
#define S22   5
 
#define S23   9
 
#define S24   13
 
#define S31   3
 
#define S32   9
 
#define S33   11
 
#define S34   15
 
#define F(x, y, z)   (((x) & (y)) | ((~x) & (z)))
 
#define G(x, y, z)   (((x) & (y)) | ((x) & (z)) | ((y) & (z)))
 
#define H(x, y, z)   ((x) ^ (y) ^ (z))
 
#define ROTATE_LEFT(x, n)   (((x) << (n)) | ((x) >> (32-(n))))
 
#define FF(a, b, c, d, x, s)   {(a) += F ((b), (c), (d)) + (x); (a) = ROTATE_LEFT ((a), (s));}
 
#define GG(a, b, c, d, x, s)   {(a) += G ((b), (c), (d)) + (x) + (UINT4)0x5a827999; (a) = ROTATE_LEFT ((a), (s));}
 
#define HH(a, b, c, d, x, s)   {(a) += H ((b), (c), (d)) + (x) + (UINT4)0x6ed9eba1; (a) = ROTATE_LEFT ((a), (s));}
 

Typedefs

typedef unsigned char * POINTER
 
typedef unsigned short int UINT2
 
typedef unsigned long int UINT4
 

Functions

void MD4_Init (MD4_CTX *context)
 
void MD4_Update (MD4_CTX *context, const unsigned char *input, unsigned int inputLen)
 
void MD4_Final (MD4_CTX *context, unsigned char digest[16])
 
unsigned long MD4_BlockChecksum (const void *data, int length)
 

Macro Definition Documentation

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

Definition at line 69 of file MD4.cpp.

#define FF (   a,
  b,
  c,
  d,
  x,
  s 
)    {(a) += F ((b), (c), (d)) + (x); (a) = ROTATE_LEFT ((a), (s));}

Definition at line 78 of file MD4.cpp.

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

Definition at line 70 of file MD4.cpp.

#define GG (   a,
  b,
  c,
  d,
  x,
  s 
)    {(a) += G ((b), (c), (d)) + (x) + (UINT4)0x5a827999; (a) = ROTATE_LEFT ((a), (s));}

Definition at line 80 of file MD4.cpp.

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

Definition at line 71 of file MD4.cpp.

#define HH (   a,
  b,
  c,
  d,
  x,
  s 
)    {(a) += H ((b), (c), (d)) + (x) + (UINT4)0x6ed9eba1; (a) = ROTATE_LEFT ((a), (s));}

Definition at line 82 of file MD4.cpp.

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

Definition at line 74 of file MD4.cpp.

#define S11   3

Definition at line 51 of file MD4.cpp.

#define S12   7

Definition at line 52 of file MD4.cpp.

#define S13   11

Definition at line 53 of file MD4.cpp.

#define S14   19

Definition at line 54 of file MD4.cpp.

#define S21   3

Definition at line 55 of file MD4.cpp.

#define S22   5

Definition at line 56 of file MD4.cpp.

#define S23   9

Definition at line 57 of file MD4.cpp.

#define S24   13

Definition at line 58 of file MD4.cpp.

#define S31   3

Definition at line 59 of file MD4.cpp.

#define S32   9

Definition at line 60 of file MD4.cpp.

#define S33   11

Definition at line 61 of file MD4.cpp.

#define S34   15

Definition at line 62 of file MD4.cpp.

Typedef Documentation

typedef unsigned char* POINTER

Definition at line 35 of file MD4.cpp.

typedef unsigned short int UINT2

Definition at line 38 of file MD4.cpp.

typedef unsigned long int UINT4

Definition at line 41 of file MD4.cpp.

Function Documentation

unsigned long MD4_BlockChecksum ( const void data,
int  length 
)

Definition at line 247 of file MD4.cpp.

void MD4_Final ( MD4_CTX context,
unsigned char  digest[16] 
)

Definition at line 220 of file MD4.cpp.

void MD4_Init ( MD4_CTX context)

Definition at line 175 of file MD4.cpp.

void MD4_Update ( MD4_CTX context,
const unsigned char *  input,
unsigned int  inputLen 
)

Definition at line 186 of file MD4.cpp.