aversive_10-03-12/modules/crypto/md5/md5c.c File Reference

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

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 Encode   memcpy
#define Decode   memcpy
#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)

Typedefs

typedef unsigned char * POINTER

Functions

void MD5Init (MD5_CTX *context)
void MD5Update (MD5_CTX *context, const unsigned char *input, unsigned int inputLen)
void MD5Final (digest, MD5_CTX *context)


Define Documentation

#define Decode   memcpy

Definition at line 75 of file md5c.c.

#define Encode   memcpy

Definition at line 74 of file md5c.c.

Referenced by MD5Final().

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

Definition at line 89 of file md5c.c.

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

Value:

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

Definition at line 101 of file md5c.c.

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

Definition at line 90 of file md5c.c.

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

Value:

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

Definition at line 106 of file md5c.c.

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

Definition at line 91 of file md5c.c.

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

Value:

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

Definition at line 111 of file md5c.c.

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

Definition at line 92 of file md5c.c.

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

Value:

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

Definition at line 116 of file md5c.c.

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

Definition at line 96 of file md5c.c.

#define S11   7

Definition at line 54 of file md5c.c.

#define S12   12

Definition at line 55 of file md5c.c.

#define S13   17

Definition at line 56 of file md5c.c.

#define S14   22

Definition at line 57 of file md5c.c.

#define S21   5

Definition at line 58 of file md5c.c.

#define S22   9

Definition at line 59 of file md5c.c.

#define S23   14

Definition at line 60 of file md5c.c.

#define S24   20

Definition at line 61 of file md5c.c.

#define S31   4

Definition at line 62 of file md5c.c.

#define S32   11

Definition at line 63 of file md5c.c.

#define S33   16

Definition at line 64 of file md5c.c.

#define S34   23

Definition at line 65 of file md5c.c.

#define S41   6

Definition at line 66 of file md5c.c.

#define S42   10

Definition at line 67 of file md5c.c.

#define S43   15

Definition at line 68 of file md5c.c.

#define S44   21

Definition at line 69 of file md5c.c.


Typedef Documentation

typedef unsigned char* POINTER

Definition at line 50 of file md5c.c.


Function Documentation

void MD5Final ( digest  ,
MD5_CTX context 
)

Definition at line 213 of file md5c.c.

References gen_regs::bits, MD5Context::count, Encode, MD5Update(), and MD5Context::state.

void MD5Init ( MD5_CTX context  ) 

Definition at line 159 of file md5c.c.

Referenced by HMAC_MD5().

void MD5Update ( MD5_CTX context,
const unsigned char *  input,
unsigned int  inputLen 
)

Definition at line 174 of file md5c.c.

Referenced by HMAC_MD5(), and MD5Final().


Generated on Fri Mar 12 06:32:05 2010 for AVR by  doxygen 1.5.6