COOLFluiD  Release kernel
COOLFluiD is a Collaborative Simulation Environment (CSE) focused on complex MultiPhysics simulations.
Macros | Functions | Variables
md5.c File Reference
#include <string.h>
#include "md5.h"

Go to the source code of this file.

Macros

#define GET_UINT32(n, b, i)   n = b[i] + (b[i+1]<<8) + (b[i+2]<<16) + (b[i+3]<<24)
 
#define PUT_UINT32(n, b, i)   do { b[i] = n; b[i+1] = n >> 8; b[i+2] = n >> 16; b[i+3] = n >> 24; } while(0)
 
#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))
 

Functions

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

Variables

const uint8_t md5_padding [64]
 

Macro Definition Documentation

#define F (   x,
  y,
 
)    (z ^ (x & (y ^ z)))
#define F (   x,
  y,
 
)    (y ^ (z & (x ^ y)))
#define F (   x,
  y,
 
)    (x ^ y ^ z)
#define F (   x,
  y,
 
)    (y ^ (x | ~z))
#define GET_UINT32 (   n,
  b,
 
)    n = b[i] + (b[i+1]<<8) + (b[i+2]<<16) + (b[i+3]<<24)

Definition at line 5 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 F(x, y, z)
#define S(x, n)
#define PUT_UINT32 (   n,
  b,
 
)    do { b[i] = n; b[i+1] = n >> 8; b[i+2] = n >> 16; b[i+3] = n >> 24; } while(0)

Definition at line 6 of file md5.c.

#define S (   x,
 
)    ((x << n) | ((x & 0xFFFFFFFF) >> (32 - n)))

Function Documentation

void md5_finish ( md5_context ctx,
uint8_t  digest[16] 
)

Definition at line 181 of file md5.c.

void md5_process ( md5_context ctx,
const uint8_t  data[64] 
)

Definition at line 18 of file md5.c.

void md5_starts ( md5_context ctx)

Definition at line 8 of file md5.c.

void md5_update ( md5_context ctx,
const uint8_t input,
uint32_t  length 
)

Definition at line 140 of file md5.c.

Variable Documentation

const uint8_t md5_padding[64]
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 174 of file md5.c.

Send comments to:
COOLFluiD Web Admin