VLC  2.1.0-git
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Typedefs | Functions
md5.c File Reference
Include dependency graph for md5.c:

Macros

#define rol(x, n)   ( ((x) << (n)) | ((x) >> (32-(n))) )
#define FF(b, c, d)   (d ^ (b & (c ^ d)))
#define FG(b, c, d)   FF (d, b, c)
#define FH(b, c, d)   (b ^ c ^ d)
#define FI(b, c, d)   (c ^ (b | ~d))
#define OP(a, b, c, d, s, T)
#define OP(f, a, b, c, d, k, s, T)
#define X(a)   do { *(u32*)p = (*hd).a ; p += 4; } while(0)

Typedefs

typedef uint32_t u32
typedef uint8_t byte
typedef struct md5_s MD5_CONTEXT

Functions

static void md5_init (void *context)
static void transform (MD5_CONTEXT *ctx, const unsigned char *data)
static void md5_write (void *context, const void *inbuf_arg, size_t inlen)
static void md5_final (void *context)
void InitMD5 (struct md5_s *h)
void AddMD5 (struct md5_s *restrict h, const void *data, size_t len)
void EndMD5 (struct md5_s *h)

Macro Definition Documentation

#define FF (   b,
  c,
 
)    (d ^ (b & (c ^ d)))
#define FG (   b,
  c,
 
)    FF (d, b, c)

Referenced by transform().

#define FH (   b,
  c,
 
)    (b ^ c ^ d)

Referenced by transform().

#define FI (   b,
  c,
 
)    (c ^ (b | ~d))

Referenced by transform().

#define OP (   a,
  b,
  c,
  d,
  s,
 
)
Value:
do \
{ \
a += FF (b, c, d) + (*cwp++) + T; \
a = rol(a, s); \
a += b; \
} \
while (0)

Referenced by transform().

#define OP (   f,
  a,
  b,
  c,
  d,
  k,
  s,
 
)
Value:
do \
{ \
a += f (b, c, d) + correct_words[k] + T; \
a = rol(a, s); \
a += b; \
} \
while (0)
#define rol (   x,
 
)    ( ((x) << (n)) | ((x) >> (32-(n))) )
#define X (   a)    do { *(u32*)p = (*hd).a ; p += 4; } while(0)

Referenced by md5_final().

Typedef Documentation

typedef uint8_t byte
typedef struct md5_s MD5_CONTEXT
typedef uint32_t u32

Function Documentation

void AddMD5 ( struct md5_s *restrict  h,
const void *  data,
size_t  len 
)
void EndMD5 ( struct md5_s h)
void InitMD5 ( struct md5_s h)
static void md5_final ( void *  context)
static
static void md5_init ( void *  context)
static
static void md5_write ( void *  context,
const void *  inbuf_arg,
size_t  inlen 
)
static

References md5_s::buf, md5_s::count, md5_s::nblocks, and transform().

Referenced by AddMD5(), and md5_final().

static void transform ( MD5_CONTEXT ctx,
const unsigned char *  data 
)
static

References md5_s::A, A, md5_s::B, B, md5_s::C, md5_s::D, FG, FH, FI, and OP.

Referenced by md5_final(), and md5_write().