md5.c File Reference

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

Go to the source code of this file.

Defines

#define F(x, y, z)   ((z) ^ ((x) & ((y) ^ (z))))
#define G(x, y, z)   ((y) ^ ((z) & ((x) ^ (y))))
#define H(x, y, z)   ((x) ^ (y) ^ (z))
#define I(x, y, z)   ((y) ^ ((x) | ~(z)))
#define STEP(f, a, b, c, d, x, t, s)
#define SET(n)
#define GET(n)   (ctx->block[(n)])

Functions

static void * body (MD5_CTX *ctx, void *data, unsigned long size)
void sat_MD5_Init (MD5_CTX *ctx)
void sat_MD5_Update (MD5_CTX *ctx, void *data, unsigned long size)
void sat_MD5_Final (unsigned char *result, MD5_CTX *ctx)

Define Documentation

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

Definition at line 28 of file md5.c.

Referenced by body().

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

Definition at line 29 of file md5.c.

Referenced by body().

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

Definition at line 30 of file md5.c.

Referenced by body().

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

Definition at line 31 of file md5.c.

Referenced by body().

#define STEP ( f,
a,
b,
c,
d,
x,
t,
 ) 
Value:
(a) += f((b), (c), (d)) + (x) + (t); \
        (a) = (((a) << (s)) | (((a) & 0xffffffff) >> (32 - (s)))); \
        (a) += (b);

Definition at line 36 of file md5.c.

Referenced by body().

#define SET (  ) 
Value:
(ctx->block[(n)] = \
        (MD5_u32plus)ptr[(n) * 4] | \
        ((MD5_u32plus)ptr[(n) * 4 + 1] << 8) | \
        ((MD5_u32plus)ptr[(n) * 4 + 2] << 16) | \
        ((MD5_u32plus)ptr[(n) * 4 + 3] << 24))

Definition at line 55 of file md5.c.

Referenced by body().

#define GET (  )     (ctx->block[(n)])

Definition at line 61 of file md5.c.

Referenced by body().


Function Documentation

static void* body ( MD5_CTX ctx,
void *  data,
unsigned long  size 
) [static]

Definition at line 69 of file md5.c.

References MD5_CTX::a, MD5_CTX::b, MD5_CTX::c, MD5_CTX::d, F, G, GET, H, I, SET, and STEP.

Referenced by sat_MD5_Final(), and sat_MD5_Update().

void sat_MD5_Init ( MD5_CTX ctx  ) 

Definition at line 176 of file md5.c.

References MD5_CTX::a, MD5_CTX::b, MD5_CTX::c, MD5_CTX::d, MD5_CTX::hi, and MD5_CTX::lo.

Referenced by sat_chksum_create().

void sat_MD5_Update ( MD5_CTX ctx,
void *  data,
unsigned long  size 
)

Definition at line 187 of file md5.c.

References body(), MD5_CTX::buffer, MD5_CTX::hi, and MD5_CTX::lo.

Referenced by sat_chksum_add().

void sat_MD5_Final ( unsigned char *  result,
MD5_CTX ctx 
)

Definition at line 221 of file md5.c.

References MD5_CTX::a, MD5_CTX::b, body(), MD5_CTX::buffer, MD5_CTX::c, MD5_CTX::d, MD5_CTX::hi, and MD5_CTX::lo.

Referenced by sat_chksum_get().

Generated on Mon Dec 12 11:44:12 2011 for satsolver by  doxygen 1.6.3