md5.C File Reference

#include "Util/md5.H"
#include <string.h>
Include dependency graph for md5.C:

Go to the source code of this file.

Defines

#define GET_UINT32(n, b, i)
#define PUT_UINT32(n, b, i)
#define S(x, n)   ((x << n) | ((x & 0xFFFFFFFF) >> (32 - n)))
#define P(a, b, c, d, k, s, t)
#define F(x, y, z)   (z ^ (x & (y ^ z)))
#define F(x, y, z)   (y ^ (z & (x ^ y)))
#define F(x, y, z)   (x ^ y ^ z)
#define F(x, y, z)   (y ^ (x | ~z))

Typedefs

typedef byte uint8

Functions

void md5_starts (md5_context *ctx)
void md5_process (md5_context *ctx, const uint8 data[64])
void md5_update (md5_context *ctx, const uint8 *input, uint32 length)
void md5_finish (md5_context *ctx, uint8 digest[16])

Variables

static uint8 md5_padding [64]

Detailed Description

general md5 (128-bit) message-digest implementation

Definition in file md5.C.


Define Documentation

#define GET_UINT32 ( n,
b,
 ) 
Value:
{                                               \
    (n) = ( (uint32) (b)[(i)    ]       )       \
        | ( (uint32) (b)[(i) + 1] <<  8 )       \
        | ( (uint32) (b)[(i) + 2] << 16 )       \
        | ( (uint32) (b)[(i) + 3] << 24 );      \
}

Definition at line 41 of file md5.C.

#define P ( a,
b,
c,
d,
k,
s,
 ) 
Value:
{                                                       \
    a += F(b,c,d) + X[k] + t; a = S(a,s) + b;           \
}
#define PUT_UINT32 ( n,
b,
 ) 
Value:
{                                               \
    (b)[(i)    ] = (uint8) ( (n)       );       \
    (b)[(i) + 1] = (uint8) ( (n) >>  8 );       \
    (b)[(i) + 2] = (uint8) ( (n) >> 16 );       \
    (b)[(i) + 3] = (uint8) ( (n) >> 24 );       \
}

Definition at line 49 of file md5.C.


Variable Documentation

uint8 md5_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 230 of file md5.C.

Generated on Sun May 8 08:42:52 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3