VLC  4.0.0-dev
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 vlc_hash_md5_Init (vlc_hash_md5_t *ctx)
 Initialize MD5 context. More...
 
void vlc_hash_md5_Update (vlc_hash_md5_t *ctx, const void *data, size_t length)
 Update MD5 hash computation with new data. More...
 
void vlc_hash_md5_Finish (vlc_hash_md5_t *ctx, void *output, size_t size)
 Finish MD5 hash computation. More...
 

Macro Definition Documentation

◆ FF

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

◆ FG

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

Referenced by transform().

◆ FH

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

Referenced by transform().

◆ FI

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

Referenced by transform().

◆ OP [1/2]

#define OP (   a,
  b,
  c,
  d,
  s,
 
)
Value:
do \
{ \
a += FF (b, c, d) + (*cwp++) + T; \
a = rol(a, s); \
a += b; \
} \
while (0)
#define rol(x, n)
Definition: md5.c:50
#define FF(b, c, d)
Definition: md5.c:74

Referenced by transform().

◆ OP [2/2]

#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, n)
Definition: md5.c:50

◆ rol

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

◆ X

#define X (   a)    do { *(u32*)p = (*hd).a ; p += 4; } while(0)

Referenced by md5_final().

Typedef Documentation

◆ byte

typedef uint8_t byte

◆ MD5_CONTEXT

typedef struct md5_s MD5_CONTEXT

◆ u32

typedef uint32_t u32

Function Documentation

◆ md5_final()

static void md5_final ( void *  context)
static

References A, B, md5_write(), p, transform(), and X.

Referenced by vlc_hash_md5_Finish().

◆ md5_init()

static void md5_init ( void *  context)
static

Referenced by vlc_hash_md5_Init().

◆ md5_write()

static void md5_write ( void *  context,
const void *  inbuf_arg,
size_t  inlen 
)
static

References transform().

Referenced by md5_final(), and vlc_hash_md5_Update().

◆ transform()

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