Blender  V2.59
Defines | Functions | Variables
md5.c File Reference
#include <sys/types.h>
#include <stdlib.h>
#include <string.h>
#include "md5.h"

Go to the source code of this file.

Defines

#define SWAP(n)   (n)
#define BLOCKSIZE   4096
#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 CYCLIC(w, s)   (w = (w << s) | (w >> (32 - s)))
#define OP(f, a, b, c, d, k, s, T)

Functions

void md5_init_ctx (struct md5_ctx *ctx)
void * md5_read_ctx (struct md5_ctx *ctx, void *resbuf) const
int md5_stream (FILE *stream, void *resblock)
void * md5_buffer (char *buffer, size_t len, void *resblock) const
void md5_process_block (void *buffer, size_t len, struct md5_ctx *ctx) const

Variables

static const unsigned char fillbuf [64] = { 0x80, 0 }

Detailed Description

Definition in file md5.c.


Define Documentation

#define BLOCKSIZE   4096

Referenced by md5_stream().

#define CYCLIC (   w,
 
)    (w = (w << s) | (w >> (32 - s)))
#define FF (   b,
  c,
 
)    (d ^ (b & (c ^ d)))

Definition at line 202 of file md5.c.

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

Definition at line 203 of file md5.c.

Referenced by md5_process_block().

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

Definition at line 204 of file md5.c.

Referenced by md5_process_block().

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

Definition at line 205 of file md5.c.

Referenced by md5_process_block().

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

Referenced by md5_process_block().

#define OP (   f,
  a,
  b,
  c,
  d,
  k,
  s,
 
)
Value:
do                                                              \
        {                                                               \
          a += f (b, c, d) + correct_words[k] + T;                      \
          CYCLIC (a, s);                                                \
          a += b;                                                       \
        }                                                               \
          while (0)
#define SWAP (   n)    (n)

Definition at line 35 of file md5.c.

Referenced by md5_buffer(), md5_read_ctx(), and md5_stream().


Function Documentation

void* md5_buffer ( char *  buffer,
size_t  len,
void *  resblock 
) const

Definition at line 158 of file md5.c.

References fillbuf, md5_init_ctx(), md5_process_block(), md5_read_ctx(), and SWAP.

Referenced by thumbname_from_uri().

void md5_init_ctx ( struct md5_ctx ctx)

Definition at line 47 of file md5.c.

References md5_ctx::A.

Referenced by md5_buffer(), and md5_stream().

void md5_process_block ( void *  buffer,
size_t  len,
struct md5_ctx ctx 
) const

Definition at line 211 of file md5.c.

References md5_ctx::A, md5_ctx::B, B, md5_ctx::C, C, D(), md5_ctx::D, FG, FH, FI, and OP.

Referenced by md5_buffer(), and md5_stream().

void* md5_read_ctx ( struct md5_ctx ctx,
void *  resbuf 
) const

Definition at line 59 of file md5.c.

References SWAP.

Referenced by md5_buffer(), and md5_stream().

int md5_stream ( FILE *  stream,
void *  resblock 
)

Definition at line 75 of file md5.c.

References BLOCKSIZE, fillbuf, md5_init_ctx(), md5_process_block(), md5_read_ctx(), sum(), and SWAP.


Variable Documentation

const unsigned char fillbuf[64] = { 0x80, 0 } [static]

Definition at line 41 of file md5.c.

Referenced by md5_buffer(), and md5_stream().