flimEngine
md5.cpp File Reference
#include <stdio.h>
#include "md5.h"
Include dependency graph for md5.cpp:

Classes

struct  MD5_CTX
 

Macros

#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)
 
#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
 

Typedefs

typedef unsigned long int UINT4
 

Functions

void MD5Init (MD5_CTX *mdContext)
 
void MD5Update (MD5_CTX *mdContext, unsigned char *inBuf, unsigned int inLen)
 
void MD5Final (MD5_CTX *mdContext)
 
void Transform (UINT4 *buf, UINT4 *in)
 
void MDPrint (MD5_CTX *mdContext)
 
void UpdateMD5Output (MD5_CTX &mdContext, MD5Output &out)
 
void MD5Buffer (unsigned char *buffer, unsigned int buffLen, MD5Output &out)
 

Variables

static unsigned char PADDING [64]
 

Macro Definition Documentation

◆ F

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

◆ FF

#define FF (   a,
  b,
  c,
  d,
  x,
  s,
  ac 
)
Value:
{(a) += F ((b), (c), (d)) + (x) + (UINT4)(ac); \
(a) = ROTATE_LEFT ((a), (s)); \
(a) += (b); \
}
#define ROTATE_LEFT(x, n)
Definition: md5.cpp:88
#define F(x, y, z)
Definition: md5.cpp:82
unsigned long int UINT4
Definition: md5.cpp:52

◆ G

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

◆ GG

#define GG (   a,
  b,
  c,
  d,
  x,
  s,
  ac 
)
Value:
{(a) += G ((b), (c), (d)) + (x) + (UINT4)(ac); \
(a) = ROTATE_LEFT ((a), (s)); \
(a) += (b); \
}
#define ROTATE_LEFT(x, n)
Definition: md5.cpp:88
unsigned long int UINT4
Definition: md5.cpp:52
#define G(x, y, z)
Definition: md5.cpp:83

◆ H

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

◆ HH

#define HH (   a,
  b,
  c,
  d,
  x,
  s,
  ac 
)
Value:
{(a) += H ((b), (c), (d)) + (x) + (UINT4)(ac); \
(a) = ROTATE_LEFT ((a), (s)); \
(a) += (b); \
}
#define ROTATE_LEFT(x, n)
Definition: md5.cpp:88
unsigned long int UINT4
Definition: md5.cpp:52
#define H(x, y, z)
Definition: md5.cpp:84

◆ I

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

◆ II

#define II (   a,
  b,
  c,
  d,
  x,
  s,
  ac 
)
Value:
{(a) += I ((b), (c), (d)) + (x) + (UINT4)(ac); \
(a) = ROTATE_LEFT ((a), (s)); \
(a) += (b); \
}
#define ROTATE_LEFT(x, n)
Definition: md5.cpp:88
unsigned long int UINT4
Definition: md5.cpp:52
#define I(x, y, z)
Definition: md5.cpp:85

◆ ROTATE_LEFT

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

◆ S11

#define S11   7

◆ S12

#define S12   12

◆ S13

#define S13   17

◆ S14

#define S14   22

◆ S21

#define S21   5

◆ S22

#define S22   9

◆ S23

#define S23   14

◆ S24

#define S24   20

◆ S31

#define S31   4

◆ S32

#define S32   11

◆ S33

#define S33   16

◆ S34

#define S34   23

◆ S41

#define S41   6

◆ S42

#define S42   10

◆ S43

#define S43   15

◆ S44

#define S44   21

Typedef Documentation

◆ UINT4

typedef unsigned long int UINT4

Function Documentation

◆ MD5Buffer()

void MD5Buffer ( unsigned char *  buffer,
unsigned int  buffLen,
MD5Output out 
)

◆ MD5Final()

void MD5Final ( MD5_CTX mdContext)

◆ MD5Init()

void MD5Init ( MD5_CTX mdContext)

◆ MD5Update()

void MD5Update ( MD5_CTX mdContext,
unsigned char *  inBuf,
unsigned int  inLen 
)

◆ MDPrint()

void MDPrint ( MD5_CTX mdContext)

◆ Transform()

void Transform ( UINT4 buf,
UINT4 in 
)

◆ UpdateMD5Output()

void UpdateMD5Output ( MD5_CTX mdContext,
MD5Output out 
)

Variable Documentation

◆ PADDING

unsigned char PADDING[64]
static
Initial value:
= {
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
}